Boost logo

Boost :

Subject: Re: [boost] [locale] review
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-04-17 15:25:49

Hi Artyom,

I don't have time to answer in much detail, but I'll just re-emphasise
that I would very much like to see a simple and fast character set
conversion like this:

     string l1_name = charset_conv<utf8,latin1>(utf8_name);

In my own charset conversion code, I generated a large enum of all the
character set names and aliases based on the IANA registry
( I then have a
fallback converter using iconv, and fast specialisations for cases like
utf-to/from-iso8859. I would happily contribute those specialisations
if you had a way to plug them in. Currently you offer either
conversion functions that take character set names as strings, which I
dislike because of the overhead of the run-time lookup that is required
(especially for short strings), and stream processing, which I dislike
because I don't want the overhead (runtime and lines-of-code) of
copying to and from stringstreams.

Regards, Phil.

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