How to find out what Unicode are available in your system?

R

RC

I tried

System.out.println(System.getProperty("file.encoding"));
System.out.println(System.getProperty("file.encoding.pkg"));
System.out.println(System.getProperty("sun.io.unicode.encoding"));
System.out.println(System.getProperty("sun.jnu.encoding"));

got output

Cp1252
sun.io
UnicodeLittle
Cp1252

I have no idea what they mean.

I would like to find out ALL available unicode names such Big5, GB2312,
ISO-8859-1, UTF-16, UTF-8, etc. in the system.
Anyone out there has any idea how to find these availabel unicode
names?

Thank Q in advance!
 
T

Thomas Fritsch

RC said:
I tried

System.out.println(System.getProperty("file.encoding"));
The default character encoding of your operating system. Java uses it
when you convert between characters and bytes, but don't give an
explicit encoding.
System.out.println(System.getProperty("file.encoding.pkg"));
System.out.println(System.getProperty("sun.io.unicode.encoding"));
System.out.println(System.getProperty("sun.jnu.encoding"));
I think these are internal details of Sun's implementation of Unicode
character-sets. You should have no business here.
got output

Cp1252
sun.io
UnicodeLittle
Cp1252

I have no idea what they mean.

I would like to find out ALL available unicode names such Big5, GB2312,
ISO-8859-1, UTF-16, UTF-8, etc. in the system.
Anyone out there has any idea how to find these availabel unicode
names?
Use Charset.availableCharSets() of package java.nio.charset
 
G

Greg R. Broderick

I tried

System.out.println(System.getProperty("file.encoding"));
System.out.println(System.getProperty("file.encoding.pkg"))
;
System.out.println(System.getProperty("sun.io.unicode.encod
ing"));
System.out.println(System.getProperty("sun.jnu.encoding"));

got output

Cp1252
sun.io
UnicodeLittle
Cp1252

I have no idea what they mean.

Then you might want to read the Internet RFCs 2045, 2046, 2047, 2048.
These will give you a good understanding of character sets as they are
used on the Internet.

I would like to find out ALL available unicode names such Big5,
GB2312, ISO-8859-1, UTF-16, UTF-8, etc. in the system.
Anyone out there has any idea how to find these availabel unicode
names?

All available character set names are available at
<http://www.iana.org/assignments/character-sets>.

java.util.Locale has a method that will return an array of all available
locales and/or ISO language codes. You may then be able to transform
these into character set names, using the MimeUtility class of the
javamail add-on package available from Sun.

Cheers
GRB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,224
Latest member
BettieToom

Latest Threads

Top