Boost logo

Boost Users :

Subject: Re: [Boost-users] Fwd: Lexical cast between narrow and wide strings
From: gast128 (gast128_at_[hidden])
Date: 2014-06-11 02:23:08

Gavin Lambert <gavinl <at>> writes:

> std::wstring wide_string = to_utf<wchar_t>(latin1_string,"Latin1");
> is a conversion to UTF-16 from "Latin1", which is the most common ANSI
> codepage (and there's discussion on there for using other codepages).
> What more were you after?
> (Yes, I know that UCS-2 and UTF-16 are not the same, but the differences
> are usually insignificant in practice. In particular modern Windows
> systems all support UTF-16.)

If the end result is Ansi and ucs-2 then it is ok (besides the misleading name).

Added some random text here to circumvent the 'There's much more quoted text
in your article than new. Prune quoted stuff.' message in gmane editor

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