Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- URL encoding japanese characters
November 28, 2006, 5:36 am
rate this thread
I have a problem related to frame src URL and japanese characters.
My application contains a Frameset/frames and we set frames's src based
on numerous conditions.
Sometimes this URL contains a few request parameters.Currently i m
testing for japanese characters in request parameters.
I have set the character-set of all web pages as "UTF-8".(Using
content-type meta tag).
Also i have made changes in filter(servlet filter) of my application to
set the set the character encoding to "UTF-8". But still i get garbled
data at server side.
If the japanese character data is submitted through forms then i get
correct data at server side, but when i set the src of frame then i get
corrupt data at server side.
Are there any other setting to be made?Or is there any other way to
encode this data?
I have tried using escape and encodeURIComponent.Both didnt work.
(Please note: I m using IE6.Application is j2ee application deployed on
Thanks in advance.
- Jukka K. Korpela
November 28, 2006, 7:39 am
Re: URL encoding japanese characters
Stop using frames, to start with.
Probably this problem has nothing to do with frames. This is one reason for
stopping using frames: there is one source of problems less, so it is easier
to identify where the problem is.
You should use HTTP headers for setting the encoding ("charset"). In the
absence of any URL, we cannot know whether you in fact have HTTP headers
that override the meta hacks (tags).
But irrespectively of such issues, the URL _should_ be % encoded after
representing it in UTF-8, by the current protocols. This is defined handling
of URLs, independently of the internal encoding of documents. On the other
hand, browsers are known to fail to comply with this relatively new
That's understandable, because form submission may work differently from URL
handling in browsers. So why don't you use forms?
Jukka K. Korpela ("Yucca")
- » How to hide close, minimise, maximize buttons on a pop up window
- — Next thread in » HTML Markup Language