浏览代码

rtl: initialize CodePage field of ReadStr/WriteStr Text variables

git-svn-id: trunk@19567 -
paul 14 年之前
父节点
当前提交
60de075ebe
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      rtl/inc/text.inc

+ 6 - 0
rtl/inc/text.inc

@@ -1768,6 +1768,9 @@ begin
   t.mode:=fmOutput;
   t.OpenFunc:=nil;
   t.CloseFunc:=nil;
+  {$ifdef FPC_HAS_CPSTRING}
+  t.CodePage:=DefaultSystemCodePage;
+  {$endif}
 end;
 
 
@@ -1865,6 +1868,9 @@ begin
   t.mode:=fmInput;
   t.OpenFunc:=nil;
   t.CloseFunc:=nil;
+  {$ifdef FPC_HAS_CPSTRING}
+  t.CodePage:=DefaultSystemCodePage;
+  {$endif}
   PSizeInt(@t.userdata[BytesReadIndex])^:=0;
 end;