aspose file tools*
The moose likes JSF and the fly likes encoding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "encoding problem" Watch "encoding problem" New topic
Author

encoding problem

baran tamer
Ranch Hand

Joined: Jan 22, 2009
Posts: 33
I used a code to determine the request and response encodings, this way i thought i could solve the encoding problem. But the problem got really weird



i used the above code in a file and below are the results in Firefox , opera and internet explorer 7 for the same file

Firefox:

Request Encoding: [UTF-8 ]
Response Encoding: [UTF-8 ]


Opera:
Request Encoding: [UTF-8 ]
Response Encoding: [UTF-8 ]


IE7:
Request Encoding: [ISO-8859-1 ]
Response Encoding: [UTF-8 ]


Firefox and Opera works fine (Shows the turkish characters) but ie7 behaves different(wrong). I have no idea why,any idea would be appreciated..
Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41489
    
  53
What is the connection between the request encoding and showing characters? The way characters are displayed depends on the response encoding, which seems to be correct.

Or is what you're displaying submitted in a form as part of the request? If so, make sure that the page that contains the form is sent as UTF-8. Browser generally use the form page's encoding as the encoding for sending form submits.

In addition, add this to your FORM tag:
<form ... accept-charset="UTF-8" ...


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: encoding problem