DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10776>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10776 [PATCH] Incorrectly getting from Unicode ------- Additional Comments From [EMAIL PROTECTED] 2002-07-13 20:04 ------- It is the patch. Sorry for double message. I forgot to mark the previous path as [PATCH]. Here the code: Index: src/java/org/apache/poi/util/StringUtil.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/util/StringUtil.java,v retrieving revision 1.2 diff -r1.2 StringUtil.java 147,155c147,154 < byte[] bstring = new byte[len]; < int index = offset + 1; < // start with low bits. < < for (int k = 0; k < len; k++) { < bstring[k] = string[index]; < index += 2; < } < return new String(bstring); --- > > char[] chars = new char[ len ]; > for ( int i = 0; i < chars.length; i++ ) { > chars[i] = (char)( string[ offset + ( 2 * i ) ] + > ( string[ offset + ( 2 * i + 1 ) ] << 8 ) ); > } > > return new String( chars ); -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
