/** * Reads a property list (key and element pairs) from the input byte stream. * The input stream is in a simple line-oriented format and is assumed to use the ISO 8859-1 character encoding; * that is each byte is one Latin1 character. * Characters
创建文件快捷菜单设置 打开窗口“Customize Perspective - Java EE”,切换选项卡到“Shortcuts”: 进行一下配置: “Generate”:如上图勾选方式 "Java":勾选所有java,之后进入子节点JUnit,去掉“JUnit Test Suite”. "SQL Development":全勾选 "Web":全勾选,之后去掉”Static Web Project“."Web Fragment Pro
新学mysql在用load data导入txt文档时发现导入的内容,select 之后是乱码,先后把表,数据库的字符集类型修改为utf8,但还是一样,最后在 http://bbs.chinaunix.net/thread-3761449-1-1.html 发现问题,导入的文档不是utf8类型的. load data local infile 'c:\\data.txt' into table person2 character set utf8 (name,age,city,salary);
解决方案: http://stackoverflow.com/questions/26256421/sql-load-data-infile-utf8-issue 即: load data local infile '/path/to/sqlfile' into table xxx character set utf8 fields terminated by ',' lines terminated by '\n'; into table xxx 后紧接着指定字符集 character set
1.确认properties文件是什么编码格式,并确认文件在该格式下中文是正常显示的2.读取时候,进行转一层,先用ISO-8859-1读取字节流,然后根据properties的文件格式进行new String(byte,"文件编码格式"); new String(bundle.getString("BOC_ACTNAME").getBytes("ISO-8859-1"),"UTF-8");