Charset.availableCharsets()

C

column

Hello,

Charset.availableCharsets() returns a lot of charsets (additionally it
returns windows-1257=windows-1257).

But why it doesn't contains Charset.defaultCharset(), that is
windows-1257-110-84? I think default charset name should be from the
Charset.availableCharsets() array.




Thank You
 
S

Sabine Dinis Blochberger

column said:
Hello,

Charset.availableCharsets() returns a lot of charsets (additionally it
returns windows-1257=windows-1257).

But why it doesn't contains Charset.defaultCharset(), that is
windows-1257-110-84? I think default charset name should be from the
Charset.availableCharsets() array.
<http://java.sun.com/javase/6/docs/api/java/nio/charset/Charset.html#availableCharsets()>
states:

"...
This method may return different results at different times if new
charset providers are dynamically made available to the current Java
virtual machine.
..."
 
R

Roedy Green

But why it doesn't contains Charset.defaultCharset(), that is
windows-1257-110-84? I think default charset name should be from the
Charset.availableCharsets() array.


Here's my guess.
It is not available on any machine but yours. It is not one of Sun's
charsets. It is supported only by your OS, and is the current default
you have configured.

Note that windows-1257 Balic rim IS supported.
 
S

Steven Simpson

column said:
But why [Charset.availableCharsets()] doesn't contains Charset.defaultCharset(), that is
windows-1257-110-84? I think default charset name should be from the
Charset.availableCharsets() array.

How are you testing this?

Charset.availableCharsets().containsValue(Charset.defaultCharset())
Charset.availableCharsets().containsKey(Charset.defaultCharset().toString())
Charset.availableCharsets().containsKey(Charset.defaultCharset().name())
 

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
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top