浏览代码

* use CP_OEMCP to convert characters in LegacyChar2ExtendedGraphemeCluster

git-svn-id: branches/unicodekvm@48533 -
nickysn 4 年之前
父节点
当前提交
11db30ab3d
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      packages/rtl-console/src/inc/video.inc

+ 6 - 1
packages/rtl-console/src/inc/video.inc

@@ -313,8 +313,13 @@ begin
 end;
 end;
 
 
 function LegacyChar2ExtendedGraphemeCluster(const Ch: Char): UnicodeString;
 function LegacyChar2ExtendedGraphemeCluster(const Ch: Char): UnicodeString;
+var
+  tmpS: RawByteString;
 begin
 begin
-  Result := Ch;
+  SetLength(tmpS, 1);
+  tmpS[1]:=Ch;
+  System.SetCodePage(tmpS,CP_OEMCP,False);
+  Result:=tmpS;
 end;
 end;
 
 
 procedure Enhanced2Legacy;
 procedure Enhanced2Legacy;