[PATCH] Move generic isPrint and columnWidth implementations to a separate header/source to allow using both generic and system-dependent versions on win32.

Manuel Klimek klimek at google.com
Mon Sep 2 03:28:31 PDT 2013


On Mon, Sep 2, 2013 at 12:26 PM, Alexander Kornienko <alexfh at google.com>wrote:

> In general one can not reliably output code points u+0080 to u+00ff using
> narrow character C/C++ output functions in Windows, because the meaning of
> the upper 128 codes is determined by the active code page in the console.
>
That  is exactly the comment I was looking for :)

On Sep 2, 2013 12:16 PM, "Manuel Klimek" <klimek at google.com> wrote:
>
>> On Mon, Sep 2, 2013 at 11:27 AM, Alexander Kornienko <alexfh at google.com>wrote:
>>
>>>
>>>
>>> ================
>>> Comment at: lib/Support/Locale.cpp:18
>>> @@ +17,3 @@
>>> +#if LLVM_ON_WIN32
>>> +  return ' ' <= UCS && UCS <= '~';
>>> +#else
>>> ----------------
>>> Manuel Klimek wrote:
>>> > I think this could need a comment. Why ~? I assume it's some
>>> limitations of a win32 terminal?
>>> This is the range of non-control ASCII characters (0x20 - 0x7E). I can
>>> add this in a comment if you think it makes sense.
>>>
>>
>> Well, especially explain why the upper latin1 is not included (I would
>> have intuitively expected it to work).
>>
>>
>>>
>>>
>>> http://llvm-reviews.chandlerc.com/D1559
>>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130902/1f944339/attachment.html>


More information about the llvm-commits mailing list