德尔福2009 年,JvAppStorage 的 unicode 替代品

发布于 2024-08-05 06:25:59 字数 282 浏览 3 评论 0原文

我正在寻找存储我的应用程序设置的最佳选项。我决定编写自己的类,该类继承自 TPercient,它将存储所有可用的配置选项。目前,我正在寻找保存它的最佳方法 - 我发现 JvAppStorage 看起来非常有前途(因为我无论如何都在我的项目中使用 JVCL...),但它不能正确处理 unicode (WideStrings)。对于 XML 文件,它将字符存储为实体,对于 ini 文件,它似乎存储正常,但在这两种情况下,加载字符串都会用大量问号替换文本...

是否有任何好的替代品可以处理 Unicode?

提前致谢。

I'm looking for the best option to store my application settings. I decided to write own class that inherits from TPersistent which would store all the config options available. Currently I'm looking for the best way to save it - and I found JvAppStorage which looked very promising (as I'm using JVCL in my project anyway...) but it doesn't handle unicode (WideStrings) properly. For XML files it stores chars as entities, for ini file it seems to be stored ok, but in both cases loading strings replaces the text with lots of question marks...

Is there any good replacement that handles Unicode as well?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

宣告ˉ结束 2024-08-12 06:25:59

最近从 ini 文件(以及可怕的 xml!)转换为 JSON 用于设置存储。它是如此方便和灵活。请参阅超级对象

Recently converted to JSON from ini files (and dreaded xml!) for setting storage. It's just so convenient and flexible. See SuperObject.

许久 2024-08-12 06:25:59

使用 UTF-8 作为 Unicode 数据在磁盘上的表示形式是很常见的。在您的代码中,使用 Utf8String 数据类型来保存以这种方式编码的数据,以便您记住在应用程序的其余部分中使用它之前需要对其进行转换。

It's quite common use use UTF-8 as the on-disk representation of Unicode data. In your code, use the Utf8String data type to hold data encoded that way so you remember that you'll need to convert it before using it in the rest of your application.

安静被遗忘 2024-08-12 06:25:59

我使用 MSXML 将每个用户的设置存储在网络上的个人目录中。
它也应该处理 Unicode。

I use MSXML to store settings per user in a personal directory on the network.
It should handle Unicode as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文