Filename encoding problem
paranoid2006 opened this issue · 0 comments
paranoid2006 commented
when using RuntimeArchiver to unzip a zipfile, two scene would cause problem:
- zip file created from Mac OS,with Chinese characters filename, then unzip the file on Windows;
- zip file crated from Windows ,with Chinese characters filename, then unzip the file on Windows.
scene 1 problem : filename encoding is UTF-8, but Windows use GBK to decode.
scene 2 problem : filename encoding is GBK,but RuntimeArchiver use UTF8_TO_TCHAR to parse m_filename,which is wrong for Chinese characters,may use MultiByteToWideChar to solve scene 2 problem
It seems there is no good way to detect which scene is ,except detect the filename endoding format