浏览代码

* Different method to determine encoding as suggested by Jonas.

Michael VAN CANNEYT 2 年之前
父节点
当前提交
5fad9f02d7
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      compiler/cresstr.pas

+ 1 - 4
compiler/cresstr.pas

@@ -203,10 +203,7 @@ uses
               begin
               if R.isUnicode and assigned(R.WValue) then
                 begin
-                if target_info.endian=endian_little then
-                  enc:=CP_UTF16
-                else
-                  enc:=CP_UTF16BE;
+                enc:=tstringdef(cunicodestringtype).encoding;
                 valuelab:=tcb.emit_unicodestring_const(current_asmdata.asmlists[al_const],R.WValue,enc,False);
                 end
               else