From c4ba95b2271703128e92b4104dbdce0de7741664 Mon Sep 17 00:00:00 2001
From: yury <jura@cp-lab.com>
Date: Fri, 1 Mar 2013 08:44:05 +0000
Subject: [PATCH] * Use CP_ASCII as fallback in GetSystemCodepage to be
 compatible with cwstring.

git-svn-id: trunk@23676 -
---
 rtl/unix/unixcp.pp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rtl/unix/unixcp.pp b/rtl/unix/unixcp.pp
index 4a98a2c5fa..8e28ef326f 100644
--- a/rtl/unix/unixcp.pp
+++ b/rtl/unix/unixcp.pp
@@ -702,14 +702,14 @@ var
   lang: ansistring;
 begin
   // Get one of non-empty environment variables in the next order:
-  // LC_ALL, LC_CTYPE, LANG. Default is CP_UTF8.
+  // LC_ALL, LC_CTYPE, LANG. Default is ASCII.
   lang:=FpGetEnv('LC_ALL');
   if lang='' then
     lang:=FpGetEnv('LC_CTYPE');
   if lang='' then
     lang:=FpGetEnv('LANG');
   if lang='' then
-    Result:=CP_UTF8
+    Result:=CP_ASCII
   else
     begin
       // clean up, for example en_US.UTF-8 => UTF-8
@@ -719,7 +719,7 @@ begin
       if p>0 then Delete(lang,p,length(lang)-p+1);
       Result:=GetCodepageByName(lang);
       if Result = CP_NONE then
-        Result:=CP_UTF8;
+        Result:=CP_ASCII;
     end;
 end;