function UnicodeToChinese(inputstr: string): string;
var
i: Integer;
index: Integer;
temp, top, last: string;
begin
index := 1;
while index >= 0 do
begin
index := Pos('\u', inputstr) - 1;
if index < 0 then
begin
last := inputstr;
Result := Result + last;
Exit;
end;
top := Copy(inputstr, 1, index); // 取出 编码字符前的 非 unic 编码的字符,如数字
temp := Copy(inputstr, index + 1, 6); // 取出编码,包括 \u,如\u4e3f
Delete(temp, 1, 2);
Delete(inputstr, 1, index + 6);
Result := Result + top + WideChar(StrToInt('$' + temp));
end;
end;
相关文章
- 中文字符 unicode转utf-8函数 python实现
- Java中字符编码问题和中文占几个字节的问题(ASCII Unicode UTF-8 )
- mysql中latin1编码中文转utf8
- JavaScript中Unicode值转字符
- Eclipse中properties文件,中文只显示Unicode问题(Properties Editor)
- 【转】IDEA 中配置文件properties文件中文乱码解决
- Eclipse中Unicode编码转中文
- eclipse中 properties文件不显示中文,显示的unicode编码-解决方案
- SAP ABAP里unicode转中文的一个解决方案的完整代码
- 中文在unicode中的编码范围