Browse Source

* Different method to determine encoding as suggested by Jonas.

Michael VAN CANNEYT 2 years ago
parent
commit
5fad9f02d7
1 changed files with 1 additions and 4 deletions
  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