Java运行时不支持编码'UTF-8' [英] The encoding 'UTF-8' is not supported by the Java runtime

查看:1809
本文介绍了Java运行时不支持编码'UTF-8'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在SUN Java(构建1.6.0_10-rc2-b32和其他1.6.x版本)下启动基于Apache Felix(OSGi)的应用程序时,我在控制台上看到以下消息输出(通常在Ubuntu 8.4下):

Whenever I start our Apache Felix (OSGi) based application under SUN Java ( build 1.6.0_10-rc2-b32 and other 1.6.x builds) I see the following message output on the console (usually under Ubuntu 8.4):


警告:Java运行时不支持编码'UTF-8'。

Warning: The encoding 'UTF-8' is not supported by the Java runtime.

我在运行Tomcat和Resin时偶尔会看到此消息。如果java支持unicode和UTF-8,导致此消息的原因是什么?我还没有找到任何参考,或者在其他地方找到答案。

I've seen this message display occasionally when running both Tomcat and Resin as well. If java supports unicode and UTF-8, what causes this message? I've yet to find any reference, or answer to this anywhere else.

推荐答案

根据文档Java平台的每个实现都需要支持以下内容标准字符集... US-ASCII,ISO-8859-1,UTF-8,UTF-16BE,UTF-16LE,UTF-16。所以我怀疑Sun是否发布了没有UTF-8支持的版本。

According the documentation "Every implementation of the Java platform is required to support the following standard charsets... US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16." So I doubt that Sun have released a build without UTF-8 support.

实际的错误信息似乎来自这里,它是Xerces XML解析器的一部分。我想这是发生问题的XML解析器。

The actual error message appears to be from here, which is part of the Xerces XML parser. I imagine it is the XML parser where the problem is occurring.

这篇关于Java运行时不支持编码'UTF-8'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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