2014年5月17日星期六

Deployed to a strange question tomcat after

Java code :

List<String> lines = FileUtils.readLines(file, "UTF-8");
for (String str : lines) {
if (StringUtils.isNotBlank(str)) {
String[] aimStr = StringUtils.split(str, "\t");
System.out.println(str);
System.out.println(aimStr[0]);
String text = aimStr[1].trim();
text = text.replace(" ", "");
}

Debug view as follows:

but deploy to tomcat output becomes:

one more ' ? ' . Exception occurs. But in the normal run unit tests :

------ Solution ------------------------------------ --------
file format is wrong, if the format is utf-8 , then you no bom of a format change
------ For reference only - --------------------------------------
question mark that is playing out elsewhere it
------ For reference only --------------------------------- ------
str read this there ?
------ For reference only --------------------- ------------------

not ah me the following exception occurs when parsing !
------ For reference only -------------------------------------- -
you send anything unusual it
------ For reference only parse --------------------------- ------------
project code is what
------ For reference only ------------------- --------------------
to file documents encoded using Notepad + + or EditPlus then set it.
------ For reference only -------------------------------------- -

Well, is this !

没有评论:

发表评论