[1067850 views]

[]

[toggle ads]

Odi's astoundingly incomplete notes

New entries | Code

UTF-8 vs. UTF8

You may have wondered whether the "correct" name of the character set is "UTF-8" or "UTF8". Both seems to work fine in Java. But what about these names in exchanged data like XML files, HTTP Content-Types etc.?

IANA has the answer. In short: always use "UTF-8". "UTF8" is just a private alias used by the JDK, but not a standardized name. The same goes for ISO encodings: "ISO-8859-1" is the name defined by IANA, "ISO8859_1" is the alias of the JDK.

posted on 2010-02-23 12:45 CET in Code | 3 comments | permalink
I honestly and truelly didn't know! I thought they were both the same, pure evil :). Many thanks.

KV
Good , thanks!!!
thanks. sure cleared that up for me