On Mon, Oct 14, 2013 at 11:02:18AM -0400, Brad King wrote: > On 10/14/2013 10:47 AM, clin...@elemtech.com wrote: > > The patch appears to not handle empty files or files with less than 3 > > characters. Does it need to? > [snip] > > ----- Reply message ----- > > From: "Evgeniy Dushistov" <dushis...@mail.ru> > > Here (in attachment) is possible solution of this problem (it passes all > > tests, except two, but they fails and without this patch). > > Incidentally I was just recently working on a fix to read CMake source > files with a leading BOM. See below for a draft function to read a BOM. > This is just work-in-progress, but it could be reviewed and ported to > C++ streams. >
> enum cmBOM_e > { > cmBOM_None, > cmBOM_UTF8, > cmBOM_UTF16BE, > cmBOM_UTF16LE, > cmBOM_UTF32BE, > cmBOM_UTF32LE > }; I wonder, does cmake support more then 8 bits for text encoding? Looking at source code there is nothing about wchar_t or converting utf-16/utf-32 to utf-8 on the fly. So what sence to support anything except utf-8 BOM? -- /Evgeniy -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers