This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

encoding problem

 
baran tamer
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic