English 中文(简体)
Hhibertate 验证器非正确显示 Unicode 字符
原标题:Hibernate Validator Not Correctly Displaying Unicode Characters

我正在建立一个使用 JSR-303 验证的 Spring MVC 网络应用程序。 我创建了第一个表格, 在支持豆的表格中添加了几个验证说明( 包括自定义错误信息代码 ) 。 我还创建了验证Messages. properities 和 验证Messages_ en. properities 文件 。

一切似乎都正常运行,只有一个例外:多字节 utf-8 编码字符没有被正确显示(例如,“ ñ” 被显示为“ \\\ ” ) 。

这与我用于字段标签和其他文本的标准信息. properities 和 message_ en. property 文件没有问题, 所以我假设它与冬眠验证码有问题。 还有谁有这个问题并解决了它? 说真的, 我使用 Hibernate 4. 3. 3. 0. final 版本 。

Thanks, Peter

最佳回答

In my properties files I must include special characters like this: u00F3 instead of ó

这样就很好地展示了它们。

希望能帮上忙

P.S.: 使用来自日圆的“资源共享”编辑器也有所帮助。

问题回答

暂无回答




相关问题
How does gettext handle dynamic content?

In php (or maybe gettext in general), what does gettext do when it sees a variable to dynamic content? I have 2 cases in mind. 1) Let s say I have <?=$user1?> poked John <?=$user2?>. ...

Explain the Need for Mutexes in Locales, Please

Reading the question Why doesn’t C++ STL support atoi(const string& ) like functions?, I encountered a comment which warned that GCC (at least) has a bug that can slow down multi-threaded ...

How does Vistalizer work

How does Vistalizer manage to override the language limit in Windows Vista Home edition. Which api s does it use to allow installation of Multiple language packages.

Localized exceptions (within a Struts2 app)

I am developing a Struts 2 application with support for multiple languages. If one of the domain objects needs to throw an exception, how can it do so in such a way that the error message is no ...

Rails Globalize plugin help

Has anyone gotten the Globalize plugin to work Rails 2.3.2 or later? If so, could you direct me to some useful info?

热门标签