知识大全 Struts 的汉字显示问题终结解决方案

Posted 文件

篇首语:男儿欲遂平生志,六经勤向窗前读。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 Struts 的汉字显示问题终结解决方案相关的知识,希望对你有一定的参考价值。

Struts 的汉字显示问题终结解决方案  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

  看了网上的很多的解决方法 似乎都很好 但实际的操作中还是发现了很多的问题 试了很久才找到最终的解决方案      主要是属性文件的字符转换问题 具体步骤和检测如下:     ) 用一般的编辑器输入所要显示的汉字     ) 使用Java JDK 下的native ascii 详细说明见        native ascii Native to ASCII Converter  Converts a file with native encoded characters (characters which are non Latin and non Unicode) to one with Unicode encoded characters   SYNOPSIS  native ascii [options] [inputfile [outputfile]]    DESCRIPTION  The Java piler and other Java tools can only process files which contain Latin and/or Unicode encoded (\\udddd notation) characters native ascii converts files which contain other character encodings into files containing Latin and/or Unicode encoded charaters   If outputfile is omitted standard output is used for output If in addition inputfile is omitted standard input is used for input     OPTIONS   reverse  Perform the reverse operation: convert a file with Latin and/or Unicode encoded characters to one with native encoded characters      encoding encoding_name  Specify the encoding name which is used by the conversion procedure The default encoding is taken from System property file encoding The encoding_name string must be taken from the first column of the table of supported encodings in the Supported Encodings document      Joption  Pass option to the Java virtual machine where option is one of the options described on the reference page for the java application launcher For example J Xms m sets the startup memory to megabytes     For encoding name you can reference:        For chinese use normally use: GBK Big In Sun s encoding document it is mentioned this conversion need: lib/rt jar or lib/charsets jar These o file only can file Sun s JRE package They cant find in Sun s JDK package     但是我在转换的时候没有这两个文件似乎也没有问题     Example: native ascii encoding GBK Inputfilename outputfilename    转换后的校验     native ascii 会因为你的系统不同 可能会有不同的转换结果 如果发现问题 你可以去:     查询 依据目前的版本 你可以找到    East Asian Scripts > Han ideographs >Unified CJK ideographs( M)     这个文件     下载后 你用PDF reader 的search功能找到你要转换的汉字 比较转换后的    字符是否正确 比如 我 在转换后为 /u     所有的JSP文件采用UTF 格式遍写 并在文件头强制:    <%@ page contentType= text/;charset=UTF language= java %>    这样你的问题就解决了 cha138/Article/program/Java/ky/201311/28754

相关参考

知识大全 Java编程技术中汉字问题的分析及解决

Java编程技术中汉字问题的分析及解决  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!  在基于Ja

知识大全 struts中文问题和国际化问题的终极解决方案

  Java本身就支持多国语言编码不需要写任何程序可以很简单的实现秘诀就是两点    所有HTML/JSP页面全部采用UTF编码    客户端浏览器完全支持UTF编码    步骤  首先把所有的HTM

知识大全 打上许多拼音而汉字只有几个显示不全

为什么搜狗输入法这样啊!打上许多拼音而汉字只有几个显示不全?设定里面你看一下,要设全拼,中文,半形!为什么只有QQ拼音一种输入法,搜狗输入法下载却不显示?唉,回答好多类似的问题了。首先,你要确定你安装

知识大全 Eclipse工具下开发Struts解决乱码的问题

Eclipse工具下开发Struts解决乱码的问题  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 

知识大全 Struts从零开始二、解决中文乱码的问题实例

Struts从零开始二、解决中文乱码的问题实例  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!  在

知识大全 Struts从零开始二、解决中文乱码的问题实例[3]

Struts从零开始二、解决中文乱码的问题实例[3]  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

知识大全 Struts从零开始二、解决中文乱码的问题实例[2]

Struts从零开始二、解决中文乱码的问题实例[2]  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

知识大全 Struts从零开始二、解决中文乱码的问题实例[4]

Struts从零开始二、解决中文乱码的问题实例[4]  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

知识大全 Struts从零开始二、解决中文乱码的问题实例[5]

Struts从零开始二、解决中文乱码的问题实例[5]  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!

知识大全 Struts从零开始二、解决中文乱码的问题实例[1]

Struts从零开始二、解决中文乱码的问题实例[1]  以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!