Boost logo

Boost :

From: Darren Cook (darren_at_[hidden])
Date: 2005-07-18 18:06:15


> Basically we want to map anything that might be contain in a std::string or
> std::wstring
> to an XML value string. I little investigation makes me think that the
> appropriate
> mechanism is to escape all "non-printable" (uh-oh?) or some subset of
> "problem characters"
> using the % escape syntax. It looks to me as non-obvious problem but I have
> yet to delve into it.

I think if you used UTF-8 as the output character set you avoid all
these problems. The conversion from UCS-2, etc. to UTF-8 is fairly
straightforward, and should be at least as quick as using %. Most
importantly it is more compact (e.g. for Japanese characters 2-3 bytes
instead of 6 bytes for %XX%XX).

Darren


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