Java,默认编码 [英] Java, default encoding
问题描述
可能的重复:
jvm的默认编码是什么?
当用于处理文本数据时,Java中的默认字符编码是什么?
我已经浏览了一段时间,我找不到答案(或我没有正确搜索)。我有文本数据,从网页下载。 Java用于此,并使用默认编码来处理一切。我的意思是,在整个过程(下载)没有指定编码,我认为必须有一些默认的。哪一个?谢谢。
您可以在应用启动时在命令行中指定默认编码:
java -Dfile.encoding = UTF8 au.com.objects.MyClass
如果没有指定,则默认值从底层操作系统获得,如上面AlbertoPL解释。
Possible Duplicate:
What is the default encoding of jvm?
Hello,
what is the default character encoding in Java, when used to process text data?
I have browsed quite a while, however, I cannot find an answer (or I am not searching properly). I have text data, which was downloaded from web pages. Java was used for this, and the default encoding to process everything. I mean, during the whole process (downloading) no encoding was specified, and I assume there must be some default one. Which one? Thank you.
you can specify the default encoding on the command line when the app is started:
java -Dfile.encoding=UTF8 au.com.objects.MyClass
If nothing is specified then the default is got from the underlying OS as AlbertoPL explains above.
这篇关于Java,默认编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!