Project

General

Profile

Revision 23bec9ad

ID23bec9ad09856a5ba6ef31517c1bc94e1e95053b
Parent c42080c5
Child 6634cb23, 3271b0d8

Added by Andreas Müller about 3 years ago

ref #6636: try to fix BOM issue in RIS byte array

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/reference/ris/in/RisRecordReader.java
63 63
            RisReferenceTag lastType = null;
64 64
            boolean startedWithTY = false;
65 65
            while ((lineOrig = lineReader.readLine()) != null) {
66
                String line = lineOrig;
67
                lineNo++;
68
                String lineNoStr = "line " + lineNo;
69
                if (isBlank(line)){
66
               String line = lineOrig;
67
               lineNo++;
68
               String lineNoStr = "line " + lineNo;
69
               if (isBlank(line)){
70 70
                   continue;
71
               }else if (count == 0 && line.length() > 1 && isTypeLine(line.substring(1))){
72
                   line = line.substring(1); //remove BOM cotrol character if encoding is not correctly working
71 73
               }
74
               // OLD BOM remove
75
               //if (Integer.valueOf(line.toCharArray()[0]).equals(65279)  ){ //remove BOM cotrol character if encoding is not correctly working
76
               //   line = line.substring(1);
77
               //}
78

  
72 79
               RisReferenceTag type;
73
               if (Integer.valueOf(line.toCharArray()[0]).equals(65279)  ){ //remove BOM cotrol character if encoding is not correctly working
74
                   line = line.substring(1);
75
               }
80

  
76 81

  
77 82
               if (matchesRisLine(line)){
78 83
                   type = RisReferenceTag.TY;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)