View | Details | Raw Unified | Return to bug 18947
Collapse All | Expand All

(-)hssf/record/BoundSheetRecord.java (-2 / +1 lines)
Line 145 Link Here
145
            field_5_sheetname = new String( data, 8 + offset, nameLength );
145
            field_5_sheetname = StringUtil.getFromCompressedUnicode( data, 8 + offset, nameLength );
146
--
(-)hssf/record/FontRecord.java (-2 / +1 lines)
Line 167 Link Here
167
                field_11_font_name = new String(data, 16,
167
                field_11_font_name = StringUtil.getFromCompressedUnicode(data, 16,
168
--
(-)hssf/record/FooterRecord.java (-2 / +1 lines)
Line 122 Link Here
122
            field_2_footer     = new String(data, 3 + offset, // [Shawn] Changed 1 to 3 for offset of string
122
            field_2_footer     = StringUtil.getFromCompressedUnicode(data, 3 + offset, // [Shawn] Changed 1 to 3 for offset of string
123
--
(-)hssf/record/FormatRecord.java (-2 / +1 lines)
Line 135 Link Here
135
          field_4_formatstring = new String(data, 5 + offset, field_3_unicode_len );
135
          field_4_formatstring = StringUtil.getFromCompressedUnicode(data, 5 + offset, field_3_unicode_len );
136
--
(-)hssf/record/HeaderRecord.java (-2 / +1 lines)
Line 122 Link Here
122
            field_2_header     = new String(data, 3 + offset, // [Shawn] Changed 1 to 3 for offset of string
122
            field_2_header     = StringUtil.getFromCompressedUnicode(data, 3 + offset, // [Shawn] Changed 1 to 3 for offset of string
123
--
(-)hssf/record/LabelRecord.java (-2 / +1 lines)
Line 160 Link Here
160
            field_6_value = new String(data, 9 + offset, getStringLength());
160
            field_6_value = StringUtil.getFromCompressedUnicode(data, 9 + offset, getStringLength());
161
--
(-)hssf/record/NameRecord.java (-10 / +5 lines)
Line 759 Link Here
759
            field_12_name_text = new String(data, 15 + offset,
759
            field_12_name_text = StringUtil.getFromCompressedUnicode(data, 15 + offset,
760
--
Line 767 Link Here
767
            field_14_custom_menu_text       = new String(data, start_of_custom_menu_text + offset,
767
            field_14_custom_menu_text       = StringUtil.getFromCompressedUnicode(data, start_of_custom_menu_text + offset,
768
--
Line 771 Link Here
771
            field_15_description_text       = new String(data, start_of_description_text + offset,
771
            field_15_description_text       = StringUtil.getFromCompressedUnicode(data, start_of_description_text + offset,
772
--
Line 775 Link Here
775
            field_16_help_topic_text        = new String(data, start_of_help_topic_text + offset,
775
            field_16_help_topic_text        = StringUtil.getFromCompressedUnicode(data, start_of_help_topic_text + offset,
776
--
Line 779 Link Here
779
            field_17_status_bar_text        = new String(data, start_of_status_bar_text +  offset,
779
            field_17_status_bar_text        = StringUtil.getFromCompressedUnicode(data, start_of_status_bar_text +  offset,
780
--
(-)hssf/record/StringRecord.java (-2 / +1 lines)
Line 137 Link Here
137
            field_3_string = new String(data, 3 + offset, field_1_string_length);
137
            field_3_string = StringUtil.getFromCompressedUnicode(data, 3 + offset, field_1_string_length);
138
--
(-)hssf/record/StyleRecord.java (-2 / +1 lines)
Line 137 Link Here
137
            field_3_name        = new String(data, 3 + offset,
137
            field_3_name        = StringUtil.getFromCompressedUnicode(data, 3 + offset,
138
--
(-)hssf/record/WriteAccessRecord.java (-2 / +1 lines)
Line 118 Link Here
118
        field_1_username = new String(data, 3 + offset, data.length - 4);
118
        field_1_username = StringUtil.getFromCompressedUnicode(data, 3 + offset, data.length - 4);
119
--
(-)util/StringUtil.java (-3 / +1 lines)
Lines 198-199 Link Here
198
198
     /**
199
200
--
201
     * read compressed unicode(8bit)
199
     * read compressed unicode(8bit)
202
     * 
200
     * 
203
     * @author Toshiaki Kamoshida(kamoshida.toshiaki at future dot co dot jp)
201
     * @author Toshiaki Kamoshida(kamoshida.toshiaki at future dot co dot jp)
204
     * 
202
     * 
205
     * @param string byte array to read
203
     * @param string byte array to read
206
     * @param offset offset to read byte array
204
     * @param offset offset to read byte array
207
     * @param len    length to read byte array
205
     * @param len    length to read byte array
208
     * @return String generated String instance by reading byte array
206
     * @return String generated String instance by reading byte array
209
     */
207
     */
210
    public static String getFromCompressedUnicode(final byte[] string,
208
    public static String getFromCompressedUnicode(final byte[] string,
211
           final int offset, final int len){
209
           final int offset, final int len){
212
        try{
210
        try{
213
            return new String(string,offset,len,"ISO-8859-1");
211
            return new String(string,offset,len,"ISO-8859-1");
214
        }
212
        }
215
        catch(UnsupportedEncodingException e){
213
        catch(UnsupportedEncodingException e){
216
            throw new InternalError();/* unreachable */
214
            throw new InternalError();/* unreachable */
217
        }
215
        }
218
    }
216
    }

Return to bug 18947