digao-dalpiaz / Updater

Delphi App to synchronize folder contents
MIT License
16 stars 5 forks source link

ERROR: No mapping for the Unicode character exists in the target multi-byte code page #2

Open digao-dalpiaz opened 2 years ago

digao-dalpiaz commented 2 years ago

When running a definition, if some file name contains Unicode characters, this error occurs, and the process is interrupted.

unicode

digao-dalpiaz commented 2 years ago

https://stackoverflow.com/questions/35708827/what-could-cause-no-mapping-for-the-unicode-character-exists-in-the-target-mult

It's a bug in Delphi.

Disabling Log File in Updater should avoid this bug.

sprudi commented 3 months ago

You can avoid this with disabling Logging or set encoding to ANSII in UEngine.pas --> TFile.AppendAllText(pubLogFile, DateTimeToStr(Now)+' - '+LogFilePrefix+Text + #13#10, TEncoding.ANSI);

digao-dalpiaz commented 2 months ago

You can avoid this with disabling Logging or set encoding to ANSII in UEngine.pas --> TFile.AppendAllText(pubLogFile, DateTimeToStr(Now)+' - '+LogFilePrefix+Text + #13#10, TEncoding.ANSI);

Right, but the text being sent to the log file contains unicode characters. So, in this case, it would not be correct for me to include a line in the file forcing ANSI encoding, right?