2
0
Эх сурвалжийг харах

merge r 14122 from cpstrnew branch by paul:
fix StringCodePage for empty unicode and ansi strings

git-svn-id: trunk@19088 -

paul 14 жил өмнө
parent
commit
5e9ee14ee7

+ 1 - 1
rtl/inc/astrings.inc

@@ -1123,7 +1123,7 @@ function StringCodePage(const S: RawByteString): TSystemCodePage; overload;
     if assigned(Pointer(S)) then
       Result:=PAnsiRec(pointer(S)-AnsiFirstOff)^.CodePage
     else
-      Result:=SizeOf(AnsiChar);
+      Result:=DefaultSystemCodePage;
   end;
 
 

+ 1 - 1
rtl/inc/ustrings.inc

@@ -2573,7 +2573,7 @@ function StringCodePage(const S: UnicodeString): TSystemCodePage; overload;
     if assigned(Pointer(S)) then
       Result:=PUnicodeRec(pointer(S)-UnicodeFirstOff)^.CodePage
     else
-      Result:=SizeOf(UnicodeChar);
+      Result:=DefaultUnicodeCodePage;
   end;