Ver código fonte

classes: fix TMBCSEncoding.IsSingleByte. Issue #36504

git-svn-id: trunk@43838 -
ondrej 5 anos atrás
pai
commit
c9ae8f94ac
1 arquivos alterados com 5 adições e 0 exclusões
  1. 5 0
      rtl/objpas/sysutils/sysencoding.inc

+ 5 - 0
rtl/objpas/sysutils/sysencoding.inc

@@ -521,6 +521,11 @@ begin
   FCodePage := ACodePage;
   FMBToWCharFlags := MBToWCharFlags;
   FWCharToMBFlags := WCharToMBFlags;
+  case ACodePage of
+    CP_UTF7, CP_UTF8, CP_UTF16, CP_UTF16BE: FIsSingleByte := False;
+  else
+    FIsSingleByte := True;
+  end;
 end;
 
 function TMBCSEncoding.Clone: TEncoding;