Boost logo

Boost Users :

Subject: Re: [Boost-users] General C++: Class Method Signatures Miss-Match
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2009-05-01 18:51:03

On Fri, May 1, 2009 at 10:38 AM, Etienne Philip Pretorius
<icewolfhunter_at_[hidden]> wrote:
> Wide chars as far as I know are different from platform to platform.
> Microsoft uses 16 bit wide chars while *nix uses 32 bit wide chars. And for
> unicode I need at least 21 bits.

It's not only a question of char size, the encoding matters. I don't
know for sure, but I bet Windows' can represent all code points by
using pairs of 16-bit wide chars (surrogate pairs). As long as you
have a way to convert the current wstring instances to a know encoding
like UTF-8, UTF-16 (bom, le, be), or UTF-32 for wire transport or
persistence, the actual representation of wstring doesn't matter.

Of course I don't know what the encoding conversion methods would be
for Windows and Linux and *nix in general. Does Boost.IOStream provide
those in a portable fashion? I'd be interested on pointers on this
topic if you know about those methods. Thanks, --DD

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at