permaculture playing cards
The moose likes XML and Related Technologies and the fly likes Character Encoding & App Servers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Character Encoding & App Servers" Watch "Character Encoding & App Servers" New topic

Character Encoding & App Servers

Cory Wilkerson
Ranch Hand

Joined: Aug 14, 2001
Posts: 84
I'm struggling a bit with character encoding/app servers/and the affect of character encoding when bits are put to the wire.
Basically, let's assume that at startup, I pass my app server the system property "file.encoding" with value = "UTF8".
A) Should this have any affect on the Content-type header returned by the app-server, ie, indiciating that the charset is of type "UTF8".
B) If one is working with XML and isn't certain of the characters that will be represented in the document, is it safe to assume that all characters will be UTF8 compliant because the VM is only working with characters that are valid in UTF8?
C) Let's also assume that the app server is sitting behind a web server who has a blanket charset flag of "IS0-8859-1". I suppose that consuming clients will then assume that the data is of type "ISO-8859-1" and parse the bits on the wire accordingly? If that's the case, and UTF-8 and ISO use different encoding at the bit level -- you'd get all manner of strange funk, yes?
Thanks for any clarification!
[ August 22, 2003: Message edited by: Cory Wilkerson ]
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Let's try moving this to the ummmmmm . . . XML forum and see if they can help.

"JavaRanch, where the deer and the Certified play" - David O'Meara
I agree. Here's the link:
subject: Character Encoding & App Servers
It's not a secret anymore!