<i18n dev> Supporting charset GB18030-2005
Pushkar N Kulkarni
pushkar.nk at in.ibm.com
Thu Nov 18 08:11:29 UTC 2021
Hi Alan,
> We could start out by adding GB18030-2005, as you suggest.
Sure.
> A potential next step would be to rename GB13080 to GB13080-2000, with "GB13080" as an alias. As it stands, the charset name is "GB13080" with "GB13080-2000" as an alias so it should be compatible with code that > use Charset.forName.
> It's possible this change may be noticed by code that does lookups in other ways or expects getName to be match the name specified to forName so that would be a feature release only change.
That's a good point.
> If there is a strong need then it should be feasible to have a system property to change GB13080 but maybe it's not needed in the short/medium term when some operating systems are still using -2000.
I agree.
Thanks for your inputs!
Pushkar N Kulkarni,
Developer, IBM Runtimes
Simplicity is prerequisite for reliability - Edsger W. Dijkstra
-----"Alan Bateman" <Alan.Bateman at oracle.com> wrote: -----
To: "Pushkar N Kulkarni" <pushkar.nk at in.ibm.com>
From: "Alan Bateman" <Alan.Bateman at oracle.com>
Date: 11/17/2021 05:20PM
Cc: i18n-dev at openjdk.java.net, core-libs-dev at openjdk.java.net
Subject: [EXTERNAL] Re: <i18n dev> Supporting charset GB18030-2005
On 16/11/2021 19:02, Pushkar N Kulkarni wrote: Hi Alan, Thanks. I appreciate your response. Yes, I think GB13080 must continue to be GB13080-2000 for now. I was initially hoping to add a new character set with the name GB13080-2005. But I guess
On 16/11/2021 19:02, Pushkar N Kulkarni wrote:
Hi Alan,
Thanks. I appreciate your response.
Yes, I think GB13080 must continue to be GB13080-2000 for now. I was initially hoping to add a new character set with the name GB13080-2005. But I guess your suggestion of internally mapping one of the two versions (2000 or 2005) to "GB13080", based on the value of a new System property, version 2000 being the default, could be a better approach.
We could start out by adding GB18030-2005, as you suggest.
A potential next step would be to rename GB13080 to GB13080-2000, with "GB13080" as an alias. As it stands, the charset name is "GB13080" with "GB13080-2000" as an alias so it should be compatible with code that use Charset.forName. It's possible this change may be noticed by code that does lookups in other ways or expects getName to be match the name specified to forName so that would be a feature release only change.
If there is a strong need then it should be feasible to have a system property to change GB13080 but maybe it's not needed in the short/medium term when some operating systems are still using -2000.
-Alan
More information about the core-libs-dev
mailing list