Explorar el Código

* Use the unixcp unit to set a default code page for ansistrings on unix-like systems.

git-svn-id: trunk@23671 -
yury hace 12 años
padre
commit
ee0a338127
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      compiler/compiler.pas

+ 9 - 1
compiler/compiler.pas

@@ -31,8 +31,12 @@ uses
   emu387,
 {$endif GO32V2}
 {$ifdef WATCOM}
-    emu387,
+  emu387,
 {$endif WATCOM}
+{$ifdef unix}
+  { system code page stuff for unix }
+  unixcp,
+{$endif}
 {$IFNDEF USE_FAKE_SYSUTILS}
   sysutils,math,
 {$ELSE}
@@ -173,6 +177,10 @@ procedure InitCompiler(const cmd:TCmdStr);
 begin
   if CompilerInited then
    DoneCompiler;
+{$ifdef unix}
+  { Set default code page for ansistrings on unix-like systems }
+  DefaultSystemCodePage:=GetSystemCodePage;
+{$endif}
 { inits which need to be done before the arguments are parsed }
   InitSystems;
   { fileutils depends on source_info so it must be after systems }