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

(-)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
--
(-)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
--
(-)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
--
(-)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
--
(-)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