Java中文编码问题
黄舟
黄舟 2017-04-17 17:48:52
0
5
480

别人给我的java代码,用sublime打开后中文注释显示乱码,该怎么处理才能看到中文注释?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
黄舟

Because the default encoding format of sublime is UTF8, which is the universal standard encoding format for web pages, but windows defaults to China’s own GB2312 or its extended GBK, so subl is used. If you directly open Chinese in a code editor such as ime, it will display garbled characters. There are two reasons: kind of solution

  1. ススkスmmThe upper left corner of file->set file encoding, select GBK encoding inside;

  2. Another method is to install sublime’s convertToUtf8 plug-in. This plug-in is very powerful and can convert files in various formats to UTF8, so that there will be no Chinese garbled characters.

迷茫

Just set the encoding and that’s it.

Baidu: sublime encoding settings

刘奇

In the status bar below sublime, there is a block on the right that displays file encoding information. You can click it and a menu will pop up. You can manually set the encoding method of the file.

小葫芦

You can download and install a sublime text plug-in, convertToUtf8, which can convert files in various encoding formats to UTF8 encoding. . .

阿神

Regarding encoding, I usually use notepad++. It can generally correctly identify the encoding and can easily convert it to any other encoding you want. You can try it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!