Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > URL encoding japanese characters

Reply
Thread Tools

URL encoding japanese characters

 
 
sunilp
Guest
Posts: n/a
 
      11-28-2006
Hi all,

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
JBOSS).
Thanks in advance.
~Sunil

 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      11-28-2006
Scripsit sunilp:

> I have a problem related to frame src URL and japanese characters.


Stop using frames, to start with.

> Sometimes this URL contains a few request parameters.Currently i m
> testing for japanese characters in request parameters.


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.

> I have set the character-set of all web pages as "UTF-8".(Using
> content-type meta tag).


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
approach.

> 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.


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")
http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      11-28-2006
To further the education of mankind, "sunilp" <(E-Mail Removed)>
vouchsafed:

> Hi all,
>
> 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.


Besides the individual (src) pages, is your frames page correctly encoded,
and does it have an appropriate doctype?

--
Neredbojias
Infinity has its limits.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
japanese encoding iso-2022-jp in python vs. perl kettle Python 4 10-24-2007 10:31 AM
URL encoding of non ASCII characters Hugo HTML 1 08-27-2007 04:29 PM
Japanese character encoding SupaDemon@gmail.com Java 1 11-07-2006 03:38 PM
Form submission Encoding Problem - saving Japanese text to the database boney Java 2 09-01-2006 06:12 PM
Re: Japanese encoding Ben Bullock HTML 1 06-24-2006 07:35 AM



Advertisments