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

Alexander Kornienko alexfh at google.com
Fri Aug 30 17:55:09 PDT 2013


  > I don't see any problems with this as long as everything still works on OS X, but I don't quite understand the motivation.
  > What's the use of using the Unicode-sensitive versions on Windows?

  It still works (at least all tests pass) on OS X. As for the motivation, it's that Windows doesn't properly support outputting UTF-8-encoded text to the console using narrow character C library functions (and iostream), as it's usually done in Linux, OS X and other modern Unix-like systems (more details, e.g. here: http://alfps.wordpress.com/2011/11/22/unicode-part-1-windows-console-io-approaches/). So we need to keep old implementation that disallows non-ascii characters, until someone figures out the right strategy for handling Unicode in Windows version of Clang/LLVM.

http://llvm-reviews.chandlerc.com/D1559



More information about the llvm-commits mailing list