On Wed, Oct 31, 2007 at 04:20:56PM +0100, Jean-Marc Lasgouttes wrote: > Enrico Forestieri <[EMAIL PROTECTED]> writes: > > > I don't understand either points. Why > > > > char_type c = 0xb5; > > os.put(c); > > > > would be ok, but > > > > unsigned char c = 0xb5; > > os.put(c); > > > > would not? > > The first one is a wide char, so it is obviously unicode-encoded. > > The second one is a 8bit char, presumably in some latinX code, but > which one?
Every character you output to a docstream must be ucs4 encoded. If its code point can be contained in an unsigned char, fine, otherwise you need a larger type. -- Enrico