eclipse设置UTF-8(字符编码集)所有方式

一、全部方式

1.修改workspace编码

windows->preferences->gengral->workspace

选择other->UTF-8。

 

 2.修改Content Types编码

windows->preferences->gengral->conten Types->Text

Default enconding–>UTF-8–>Update(这样把里面所有的文件设置为UTF-8编码)

 

 3.修改web下文件的编码

windows->preferences->web->(css files、html files、javaServer face、jsp files)

在enconding设置为ISO 10646/Unicode(UTF-8)

 

 4.修改项目的编码,对于导入的项目,包,类也可以单独去配设置

右键》properties》Resource

 testNG中文乱码

 

 

 

 

项目右键》Run as 》Run Configurations

 

二、单独方式

1.在某一文件上鼠标右键→Properties→Resource→Text file encoding

 

 

最近网上有一种新的方式修改eclipse的配置文件eclipse.ini,笔者还没试过如下仅供参考。

加上一行

-Dfile.encoding=utf-8    

还可以顺便改改内存大小,改善运行效果

 

posted on   梁凤财Zero  阅读(3607)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2019-04-04 java多线程启动的方法runnable和callable

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示