Hello All MinGW users,
I encountered something strange... while changing my little progs to use
wide characters (for internationalization of course) it appears file names
cannot use wchar_t... to hold every string I use now std::wstring, but I
can't use it to open stream file... std::wofstream( ) uses char * as
parameter for file name, and only way to make it work now is to convert my
wide string to narrow string, i.e.
std::string narrow_file_name = wide_file_name;
and than open file:
std::wofstream file_stream( narrow_file_name.c_str( ));
I see that g++ takes that, but what if wide file name would use some asian
chars? Will this conversion give proper file name when creating file? Or
maybe I'm doing something wrong, maybe there is proper approach that I
[i18n issue because:]
> std::wofstream( ) uses char * as parameter for file name
That seems to be an issue with the language standard
(C++98 126.96.36.199) rather than with the gnu libstdc++
implementation. I don't know how you'd work around it
without overriding basic_ofstream::open(). Perhaps
this has been discussed in the C++ newsgroups.
Get latest updates about Open Source Projects, Conferences and News.