GB18030 (was: Re: charset changes)

Andy Koppe
Mon Mar 29 18:19:00 GMT 2010

Corinna Vinschen:
> Anyway, feel free to send a patch to change the charset name parameter
> to an array index parameter.

Attached is a newlib patch for that. The core of it is the removal of
the calls to __cp_index and __iso_8859_index from the singlebyte
charset conversion functions and adding a __charset_index global
variable, but quite a lot of function definitions and calls needed to
be changed accordingly to take an index argument instead of a string.

Also attached is a description of the corresponding winsup changes
that are needed. I'll write a ChangeLog entry for the newlib bit if we
decide to go ahead with this.

>> As this will impact
>> code that's ifdeffed out for Cygwin, can you recommend a
>> multibyte-enabled platform to compile (and test?) that on?
> In how far?  The parameter is entirely unused outside of the CP and ISO
> stuff, and CP and ISO are used on Cygwin as well.

I was concerned I might forget to change a prototype or call
somewhere, but actually Cygwin does use all the functions in question,
I think.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: newlib.patch
Type: application/octet-stream
Size: 34273 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winsup.changes
Type: application/octet-stream
Size: 1698 bytes
Desc: not available
URL: <>

More information about the Cygwin-developers mailing list