Hi, it means 'MultiByte' is not a wchar_t(Unicode-UCS2) and not a UTF8 unicode. Pretty weird?
East Asia has been used by own language mapping to JUST ascii stream. In our case(South korea), 2byte ascii stream map to one Korean Character, and ascii map to one.(Like UTF-8) Recently, we are going to UCS2(by MS). But most people still using multi byte system. I thought, because of this, C++ Standard make locale function.. i don;t know about c++ spec well. Anyway, thank you and have a good day. On 6월25일, 오전12시29분, Eugene Zolenko <[EMAIL PROTECTED]> wrote: > > I read few article about FileSource class's path problem. > > because i have same problem..and > > Someone said 'make to new fstream for solving'..like that. > > > Here is my sugeestion and proposal. let's discuss about this. > > I debug that part, > > exactly 'files.cpp' line 163 and 30. > > > In this part, std::ofstream used by smartptr template. > > yes, smartptr template is normally works well... > > > But if user set filename with multi-byte string for file open, > > 'if (!*m_file)' <- THIS PART! > > this part returning to NULL. > > (std::ofstream for working well for any multibyte path) > > > What happen on here? if use only just ascii string, works fine. > > How can we fix this? > > By multi-byte you mean wchar_t*? Or UTF8-encoded char*? > > std::fstream doesn't take anything but char* for filename, because > underneath it uses fopen() to open the file. Even std::wfstreams take > char* filename :\. On windows, you can open file with _wfopen() and > pass FILE handle back to the stream. But that is windows only hack in > STL (maybe MS compilers only). On OSX and Linux you'll have to take > wchar_t* path, encode it into UTF-8 char* and use that to create a > stream from a file. (same approach doesn't work on windows for some > reason -- have to use _wfopen() O_o). > > Blame C++ standardization committee for major Unicode screw-up :(. > (and this is only one issue, the problems with all the different > wchar_t sizes are much worse). > > The fix you came up with might be just happening to work on you system > -- test it on different system with different codepage, or test it on > a random unicode path.- 따온 텍스트 숨기기 - > > - 따온 텍스트 보기 - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [EMAIL PROTECTED] More information about Crypto++ and this group is available at http://www.cryptopp.com. -~----------~----~----~----~------~----~------~--~---
