linux删除文件夹、文件名字转码、java转码、json字符报错、查看当前系统编码、传代码至git

 

删除文件夹及其下所有文件
rm -rf ebay/

-------------------------------------------------------------------------------------

https://blog.csdn.net/qingfengxulai/article/details/80855005

有时我们经常碰到某目录下文件名乱码的情况,convmv可以批量转换文件名编码。

使用
yum install convmv -y
#把文件名从utf8转换为gbk
convmv -f UTF-8 -t GBK -r --notest *

说明:-r 表示包含所有子目录,并且连带目录一起转换。不加–notest,表示只打印转换结果,不做实际转换。

------------------------------------------------------------------------------------

https://blog.csdn.net/qq_28863045/article/details/79503945

String s_iso88591 = new String("ö".getBytes("UTF-8"),"ISO8859-1");
String s_utf8 = new String(s_iso88591.getBytes("ISO8859-1"),"UTF-8");

------------------------------------------------------------------------------------

https://blog.csdn.net/zhouxukun123/article/details/79438560

解析json字符串时,报如下错误:

com.alibaba.fastjson.JSONException: unclosed string : 米

该问题是因为json字符串中含有“\”导致的,如:

{"mc":"***\米***"}

其他字符的这种报错原因类似。

解决方法

去掉json字符串中的“\”:

str = str.replaceAll("\\\\米", "米");

------------------------------------------------------------------------------------

https://www.cnblogs.com/saneri/p/5779119.html

第一种:

[root@Testa-www tmp]# echo $LANG
zh_CN.UTF-8

第二种:

[root@Testa-www ~]# env |grep LANG
LANG=zh_CN.UTF-8

第三种:

[root@Testa-www ~]# export |grep LANG
declare -x LANG="zh_CN.UTF-8"

------------------------------------------------------------------------------------

https://blog.csdn.net/lynn_Kun/article/details/73740400

eclipse提交代码至GitHub

posted @ 2019-02-14 18:15  yangly  阅读(361)  评论(0编辑  收藏  举报