EclipseLink 和数据库编码

发布于 2024-09-24 08:52:23 字数 390 浏览 0 评论 0原文

我是一个全球应用程序的开发人员,该应用程序部署在几个国家,这些国家的语言对我们来说不是问题。但现在,我们要去斯洛伐克,我们在使用 EclipseLink 时遇到了一些问题。

我们设置了一个小型 Web 应用程序来测试他们项目的数据库上的文本编码。我们能够使用 EclipseLink 读取数据,该数据直接插入到数据库(SQL 服务器)上,但是当尝试使用 EntityManager 插入时,EclipseLink 会发送一堆 unicode 字符,这些字符不会被数据库“翻译”,但按原样插入。

到目前为止我还一无所知,因为我尝试在 EclipseLink 上搜索有关此主题的文档,但没有运气。你们能分享一些关于这方面的智慧吗?有人需要使用 ORM 框架支持其他语言,并且可以分享他们的经验吗?

提前致谢!

I am a developer for a global application, which was deployed in a few countries whose languages were not a problem for us. But now, we're going to Slovakia, and we're having a bit of trouble with EclipseLink.

We've setup a small web application to test the text encoding on the database for their project. We're able to read data using EclipseLink, which was inserted directly on the database (SQL server), but when trying to insert using the EntityManager, EclipseLink sends a bunch of unicode chars instead, which are not 'translated' by the database, but inserted as is.

I'm kinda clueless so far, since I've tried to search on EclipseLink for documentation regarding this topic, but had no luck. Can you guys share some of your wisdom regarding this? Anyone had to support other languages using ORM frameworks, and can share their experience?

Thanks in advance!

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

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

发布评论

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

评论(1

奢欲 2024-10-01 08:52:23

事实证明,这个问题是在 DBMS 级别处理的。包含文本数据的表需要适当的类型才能处理 unicode 字符;对于 SQL Server,此类型为“nvarchar”。

As it turns out, the issue is dealt with at the DBMS level. The tables that contain textual data need an appropriate type in order to handle unicode characters; in the case of SQL server, this type is 'nvarchar'.

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