Ver Fonte

* use current code page when converting ansichar to unicodestring

git-svn-id: trunk@21877 -
Jonas Maebe há 13 anos atrás
pai
commit
596d359e02
1 ficheiros alterados com 3 adições e 5 exclusões
  1. 3 5
      rtl/java/justrings.inc

+ 3 - 5
rtl/java/justrings.inc

@@ -267,12 +267,10 @@ Function fpc_Char_To_UnicodeStr(const c : AnsiChar): UnicodeString; compilerproc
   Converts a AnsiChar to a UnicodeString;
 }
 var
-  str: JLString;
-  arr: array of jbyte;
+  arr: array[0..0] of ansichar;
 begin
-  setlength(arr,1);
-  arr[0]:=ord(c);
-  result:=JLString.create(arr,0,1);
+  arr[0]:=c;
+  widestringmanager.Ansi2UnicodeMoveProc(pansichar(@arr),DefaultSystemCodePage,result,1);
 end;