[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix u32toutf8 so it encodes values > 0xFFFF correctly.

From: Chet Ramey
Subject: Re: Fix u32toutf8 so it encodes values > 0xFFFF correctly.
Date: Mon, 20 Feb 2012 21:42:01 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

On 2/18/12 5:39 AM, John Kearney wrote:

> Bash Version: 4.2
> Patch Level: 10
> Release Status: release
> Description:
>       Current u32toutf8 only encode values below 0xffff correctly.
>         wchar_t can be ambiguous size better in my opinion to use
> unsigned long, or uint32_t, or something clearer.

Thanks for the patch.  It's good to have a complete implementation,
though as a practical matter you won't see UTF-8 characters longer
than four bytes.  I agree with you about the unsigned 32-bit int
type; wchar_t is signed, even if it's 32 bits, on several systems
I use.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]