[webkit-dev] Should LChar really being unsigned char? (was Re: SerializedScriptValue: signed vs unsigned char)
Glenn Adams
glenn at skynav.com
Sun Feb 10 09:14:56 PST 2013
On Sun, Feb 10, 2013 at 10:03 AM, Balazs Kelemen <kbalazs at webkit.org> wrote:
> On 02/07/2013 01:48 AM, Maciej Stachowiak wrote:
>
>
> I think we should continue to use uint8_t instead of char as the primary
> way to represent a raw byte in WebKit. First, it's good to distinguish raw
> data from C strings at the type system level, and second, the unpredictable
> signedness of char is actively bad for byte-oriented processing. Another
> library making a different choice doesn't overcome these reasons.
>
>
> I agree with that, but I still don't see why should LChar be unsigned
> since it is a character and not a raw byte. It would be somewhat more
> convenient when dealing with string literals or traditional C libraries. I
> you agree I could investigate in the refactoring work.
>
Because LChar is often (always?) UTF-8 encoded, the individual encoding
units of which are 0x00 through 0xFF.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130210/430a60ed/attachment.html>
More information about the webkit-dev
mailing list