Boost logo

Boost :

Subject: Re: [boost] Change to guidelines for characters in C++ source files
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-06-25 20:22:21


On 25 Jun 2015 at 10:12, 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?

+10. I'd suggest UTF-8 with or without BOM. Just assume it is, if
it's 7-bit clean now it's automatically UTF-8 clean. Don't forget to
adjust all the .gitattributes in all boost git repos to say UTF-8
encoding for source files, some git tools won't render diffs right
without that.

As an aside, I recently had merry hell getting AFIO to get sent per
commit to the wandbox online compiler and wasted a full day trying.
Louis' python script which worked finally, while Krzysztof shell
script did not. I had been trying to get the latter working.

I figured out the problem: I suspect AFIO has a unicode char
somewhere in its source code which only appears when you try to pipe
it through scripting in order to upload it to a JSON REST API. Python
errored out on the bad string, whilst the shell script just magically
failed silently. That alerted me to the need to tell Python the
source code has a codec, and then it all worked. Bear these sorts of
problem in mind if you switch on UTF-8, as debugging that stuff was
not obvious.

BTW wandbox scripting instructions are now at
https://svn.boost.org/trac/boost/wiki/BestPracticeHandbook#a14.USERFRI
ENDLINESS:Considerlettingpotentialuserstryyourlibrarywithasinglemousec
lick for anyone interested.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



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