Adding support for gb2312 and sift-jis to newlib iconv

Corinna Vinschen vinschen@redhat.com
Mon Jan 9 10:50:09 GMT 2023


On Dec 24 13:54, Anas N. via Newlib wrote:
> 
> Hi newlib team,
> In the project I am working there is requirement to covert UCS2 to following code pages
> 
> 1.       Chinese: gb2312
> 2.       Japanese: shift_ jis
> 3.       Russian : cp1251
> 4.       Hungrian, Polish and Cesky: cp1252
> 5.       Default:cp1250
> I could see that items 3-5 are supported in newlib iconv library.
> 
> For gb2312  or gbk  I could see that it's supported in Cygwin-windows
> only.

GB2312 is incompatible with the portable codeset, i.e. ASCII, and we
can't handle that in Cygwin.  The underlying code translates GB2312
into codepage 936 which defines GBK.  So GB2312 in Cygwin is actually GBK.

> Is there a feasibility issue to support gb2312 for embedded
> cortex M controllers?

Somebody would have to provide code...

> I can see Jis implementation in newlib and but is not available for
> Cygwin.Is It available for embedded   cortex M controllers?

The newlib code should support it.  Cygwin couldn't due to some
incompatibility problem.

> What is the difference between jis and shit-jis

https://de.wikipedia.org/wiki/Shift_JIS


Corinna



More information about the Newlib mailing list