在Delphi 2009之前如何处理UTF-8和ANSI转换? [英] How to handle UTF-8 and ANSI conversion before Delphi 2009?

查看:145
本文介绍了在Delphi 2009之前如何处理UTF-8和ANSI转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Delphi 2009中,我们有:

In Delphi 2009 we have:

RichEdit1.Lines.LoadFromFile(OpenDialog1.FileName,TEncoding.UTF8);
RichEdit1.Lines.SaveToFile(OpenDialog2.FileName,TEncoding.Unicode);    

如果我没有 TEconding <怎么在Delphi 2006上做到这一点

是否有某种方式可以将较新的图书馆运回那里?还是在Web中隐藏了解决方案?

Is there someway to transport that newer library back there? or is there a solution hidden in the Web?

推荐答案

我相信 UTF8Encode UTF8Decode 甚至在Delphi 2009之前就已存在。因此,您可以手动解码/编码字节字符串。 (我自己做了。)

I believe that UTF8Encode and UTF8Decode were present even before Delphi 2009. So you can decode/encode byte strings manually. (I have done that myself.)

这篇关于在Delphi 2009之前如何处理UTF-8和ANSI转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆