native2ascii的简单问题,大虾相助啊

yanhao_yi 2004-07-15 09:50:39
小弟要把一个资源文件native2ascii转码成utf-8
在dos提示符下执行
native2ascii -encoding utf-8 ApplicationResources_xx.properties ApplicationResources_zh.properties
出如下错误
sun.io.MalformedInputException

我是初学,请大虾们相助。谢谢
...全文
142 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yanhao_yi 2004-07-15
  • 打赏
  • 举报
回复
up
yanhao_yi 2004-07-15
  • 打赏
  • 举报
回复
可是为什么会出错呢?
出如下错误
sun.io.MalformedInputException
areshong 2004-07-15
  • 打赏
  • 举报
回复
native2ascii Converter

結構
native2ascii [options] [inputfile [outputfile]]

說明

Java 編譯器和其它 Java 工具只能處理含有 Latin-1 和/或 Unicode 編碼(\udddd 記號)字符的文件。native2ascii 將含有其它字符編碼的文件轉換成含 Latin-1 和/或 Unicode 編碼字符的文件。

若省略 outputfile,則使用標準輸出設備輸出。此外,如果也省略 inputfile,則使用標準輸入設備輸入。

選項

-reverse
執行相反的操作:將含 Latin-1 和/或 Unicode 編碼字符的文件轉換成含本地編碼字符的文件:

-encoding encoding_name
指定轉換程序使用的編碼名稱。預設的編碼從系統屬性 file.encoding 中得到。encoding_name 字符串必須是下表第一欄所示的字符串。


Converter kind decription
Big5 Big5 碼,繁體中文
GBK GBK碼,簡體中文
UTF8 Unicode,UTF8碼
xunyiren 2004-07-15
  • 打赏
  • 举报
回复
Checked exception thrown when an input byte sequence is not legal for given charset, or an input character sequence is not a legal sixteen-bit Unicode sequence

ChDw 2004-07-15
  • 打赏
  • 举报
回复
加encoding是说明你源文件的编码格式,目标的文件应该都是没有中文等符号的,只有标准的一些字符,应该是没有编码问题的
yanhao_yi 2004-07-15
  • 打赏
  • 举报
回复
native2ascii -encoding utf-8 ApplicationResources_xx.properties ApplicationResources_zh.properties

源文件 ApplicationResources_xx.properties
目标文件 ApplicationResources_zh.properties


chengongpu 2004-07-15
  • 打赏
  • 举报
回复
native2ascii ApplicationResources_xx.properties 目标文件名称

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧