visual c++ - How come VC++ 2010 uses char buffer rather than wchar_t buffer to represent basic_filebuf<wchar_t>? -


it very strange me vc++ docs says: (at: http://msdn.microsoft.com/en-us/library/tzf8k3z8(vs.90).aspx)

"objects of type basic_filebuf created internal buffer of type char * regardless of char_type specified type parameter elem. means unicode string (containing wchar_t characters) converted ansi string (containing char characters) before written internal buffer. store unicode strings in buffer, create new buffer of type wchar_t , set using basic_streambuf::pubsetbuf() method. see example demonstrates behavior, see below."

why?

this guess may way handle common case (at least on windows) program's internals wchar_t (16-bit unicode characters) most/all text files outputs 8-bit ansi.

most text files still seem ansi unless need otherwise, , many programs cannot cope unicode text files.

i wonder if it's really ansi string or utf-8 string converts to...


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -