Boost logo

Boost :

Subject: Re: [boost] [strings][unicode] Proposals for Improved String Interoperability in a Unicode World
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-01-29 08:33:26


On 01/29/2012 09:13 AM, Artyom Beilis wrote:

> In fact the ONLY modern compiler that deos not suppor them is Vistual Studio,
> all others I had ever used (gcc, clang, intel, sunstudio) work fine
> with UTF-8.

They all support it, the problem is that they require different things
to use it.

> 1. BOM should not be used in source code, no compiler except MSVC uses it and most
> do not support it.

According to Yakov, GCC supports it now.
It would be nice if it could work without any BOM though.

> 2. Setting UTF-8 BOM makes narrow literals to be encoded in ANSI encoding which
> makes BOM useless (crap... sory) with MSVC even more.

That's the correct behaviour. Use u8 string literals if you want UTF-8.
The problem is only present if the compiler doesn't have those string
literals.


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