浏览代码

* TEncoding.GetEncoding - create unicode encodings, not only MBCS

Ondrej Pokorny 3 年之前
父节点
当前提交
bce2f26234
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/objpas/sysutils/sysencoding.inc

+ 1 - 1
rtl/objpas/sysutils/sysencoding.inc

@@ -454,7 +454,7 @@ begin
   ACodePage := CodePageNameToCodePage(AnsiString(EncodingName));
   ACodePage := CodePageNameToCodePage(AnsiString(EncodingName));
   if ACodePage = $FFFF then
   if ACodePage = $FFFF then
     raise EEncodingError.CreateFmt(SNotValidCodePageName, [EncodingName]);
     raise EEncodingError.CreateFmt(SNotValidCodePageName, [EncodingName]);
-  Result := TMBCSEncoding.Create(ACodePage);
+  Result := GetEncoding(ACodePage);
 end;
 end;
 
 
 function TEncoding.GetString(const Bytes: TBytes): UnicodeString;
 function TEncoding.GetString(const Bytes: TBytes): UnicodeString;