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
Sabine Dinis Blochberger - 24 Mar 2008 13:06 GMT
> Hello,
>
[quoted text clipped - 4 lines]
> 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.
.."

Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
Roedy Green - 24 Mar 2008 13:06 GMT
On Mon, 24 Mar 2008 04:46:24 -0700 (PDT), column
<column.column@gmail.com> wrote, quoted or indirectly quoted someone
who said :
>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.

Signature
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Steven Simpson - 24 Mar 2008 13:25 GMT
> 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())

Signature
ss at comp dot lancs dot ac dot uk |