[cmake-developers] [PATCH] [RFC] handle c dependicies for files with utf-8 BOM

Evgeniy Dushistov dushistov at mail.ru
Mon Oct 14 16:40:52 EDT 2013


On Mon, Oct 14, 2013 at 11:02:18AM -0400, Brad King wrote:
> On 10/14/2013 10:47 AM, clinton at 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" <dushistov at 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



More information about the cmake-developers mailing list