Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2007-06-02 11:54:06


Filip Konvic(ka wrote:

...catching up....

>
> :-) I'm *not* having problems reading/writing international characters
> as long as I don't send ptime to wcout.
>
> I did some debugging on the matter and I suspect that the line
> boost/date_time/posix_time/posix_time_io.hpp:61 is the culprit. It
> changes the locale of wcout and whatever machinery should revert this
> back, it does not. This agrees with my observation that using a
> wostringstream for formatting does not damage wcout.
>
> What do you think?

By itself I don't see how this is a problem. You'll note the previous line:

       std::locale l = std::locale(os.getloc(), f);

This code is adds a facet to the existing locale, makes a copy, which then
gets imbued into the stream. So, all the previously existing locale settings
should be preserved.

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net