gtreshchev / RuntimeArchiver

Runtime Archiver plugin for Unreal Engine. Cross-platform archiving and unarchiving directories and files. Supports Zip, Oodle, Tar, LZ4 and GZip formats.
MIT License
93 stars 18 forks source link

Filename encoding problem #1

Open paranoid2006 opened 1 year ago

paranoid2006 commented 1 year ago

when using RuntimeArchiver to unzip a zipfile, two scene would cause problem:

  1. zip file created from Mac OS,with Chinese characters filename, then unzip the file on Windows;
  2. 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