Boost logo

Boost :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2004-04-06 11:58:05

In article <001b01c41bdb$9882c030$8119fea9_at_FDI.LOCAL>,
 "Dale Peakall" <dale_at_[hidden]> wrote:

> I have to agree. Programs should internally work in terms of
> fixed-width character sets. When string data needs to be imported/
> exported locales should be used to perform the transformation.

The only fixed-width Unicode character sets are 32 bits wide; UTF-16 is not
fixed width, it's only fixed width most of the time. You will have a hard time
convincing me (and most other people, as far as I know) that it's a good idea
for all of your strings to take 4x as much space as they need.

A fixed-width character set is a win mainly when you are doing character-level
manipulation, which isn't very common in any properly internationalized app
because internationalized apps read most of their strings from a table and use
only concatenation (where sprintf/boost::format are considered little more than
concatenation) to produce new strings. If all you are doing is concatenation,
you don't care about fixed-width characters.

That is not to say that fixed-width character sets don't have their uses, but it
is not at all as simple as "you should use them all the time".


If this message helped you, consider buying an item
from my wish list: <>

Boost list run by bdawes at, gregod at, cpdaniel at, john at