Boost logo

Boost :

Subject: Re: [boost] Fw: [locale] Formal review of Boost.Locale library
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-14 17:25:30


> In binary level, this is same.

> What should we do?
> Using string literal with no prefix is practically dangerous.
>

You should do following.

1. Do not include direct localized text to sources,
   that is what localization system for.

2. If you have to then use UTF-8 in the sources that
   it would remain UTF-8
   for char * strings as well and would be handled
   correctly for L"..." prefixes.

3. When you use MSVC add UTF-8 BOM (even thou it is
   useless but this is the way MSVC distinguishes
   between local encodings and UTF-8)

   Bad but this is reality.

In fact almost all Unit tests in Boost.Locale use inline UTF-8
and believe me, it made my life significantly simpler.

Artyom


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