Boost logo

Boost :

Subject: Re: [boost] Change to guidelines for characters in C++ source files
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-06-26 06:54:06


On 26/06/2015 10:24, Sebastian Redl wrote:
> On 26.06.2015 00:15, Paul Mensonides wrote:
>> On 6/25/2015 7:12 AM, Beman Dawes wrote:
>>
>>> It looks to me like it is high time to change the Boost guideline
>>> for C++
>>> source file encoding to 7-bit ASCII without BOM or UTF-8 with BOM,
>>> and to
>>> change the inspect program accordingly.
>>>
>>> Comments?
>>
>> BOM is evil.
> The Microsoft compiler will treat files without a BOM as encoded in
> its local codepage, with no way to override. If you want MSVC to read
> the source as UTF-8, you need a BOM.
>
> They have no plans to change this either, see
> https://connect.microsoft.com/VisualStudio/Feedback/Details/888437 .
> The bug is closed as wontfix.
>
> "Unfortunately, we currently have no plans to implement the support of
> UTF-8 files without byte order marks."
>
> Thus, we need a BOM in our source files if they contain UTF-8. That's
> just a sad fact.
>

This is a real issue too - I've had bug reports in the past from
non-English users who were unable to compile Boost source that had
accidently acquired something other than a 7-bit character.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk