소스 검색

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

git-svn-id: trunk@19088 -

paul 14 년 전
부모
커밋
5e9ee14ee7
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      rtl/inc/astrings.inc
  2. 1 1
      rtl/inc/ustrings.inc

+ 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;