本文整理自网络,侵删。
当调用 TStrings.LoadFromFile(html_file_name, TEncoding.UTF8); 出现 No mapping for the Unicode character exists in the target multi-byte code page错误。
这种错误在调用非UTF8编码的文件时会出错。
处理方法如下
tmpStrs.LoadFromFile(html_file_name, TEncoding.UTF8); //先用utf-8尝试 except //出现 No mapping for the Unicode character exists in the target multi-byte code page tmpStrs.LoadFromFile(html_file_name); //再用默认编码尝试 end;――――――――――――――――
原文链接:https://blog.csdn.net/webouse/article/details/54599217
相关阅读 >>
Delphi 官方 processmessages 用法代码例子
更多相关阅读请进入《Delphi》频道 >>