views:

117

answers:

3

Just curious about the the encoding of files (the actual rendered pages). What encoding should they be in to support widest possible language space in a typical jsp type web application.

+8  A: 

The multilingual pages should be rendered in UTF-8 encoded to maximize the chances that the user's browser can display them correctly. This is a W3C recommendation.

Stephen C
+1  A: 

EBCDIC

Kevin Day
Huh? Is this an obscure joke on the OP's name?
Stephen C
Hah - I didn't even notice the OP's name. Nope - this is just an obscure joke.
Kevin Day
Thanks. Yes an obscure joke
bcd
+1  A: 

UTF-8 supports all characters that could be used.

DeepNightTwo
@Deep ... unless you want to write Klingon :-).
Stephen C
How can an 8 bit encoding support all character sets out there?
bcd
UTF-8 is not an 8 bit encoding. It is a variable-width encoding. Characters encoded as UTF-8 take up between 1 and 4 bytes. See examples in this table: http://illegalargumentexception.blogspot.com/2009/05/java-rough-guide-to-character-encoding.html#javaencoding_javadatatypes
McDowell
There are UTF-16 and UTF-32 which may use more space for the same charactor. UTF-8 is liek some kind of "Best Practice". It uses a byte to store an English charactor, two bytes to store a frequent-used multi-bytes charactor, and three bytes to store a unfrequent-used multi-bytes charactors.
DeepNightTwo