ASF Bugzilla – Attachment 34398 Details for
Bug 60289
UTF decoding in XSSFRichTextString does not work when the code is lowercase
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that fixes the bug
patch.txt (text/plain), 1.40 KB, created by
Daniel Gonzalez
on 2016-10-21 11:35:58 UTC
(
hide
)
Description:
Patch that fixes the bug
Filename:
MIME Type:
Creator:
Daniel Gonzalez
Created:
2016-10-21 11:35:58 UTC
Size:
1.40 KB
patch
obsolete
>Index: src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java >=================================================================== >--- src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java (revisión: 1765824) >+++ src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java (copia de trabajo) >@@ -75,7 +75,7 @@ > * </blockquote> > */ > public class XSSFRichTextString implements RichTextString { >- private static final Pattern utfPtrn = Pattern.compile("_x([0-9A-F]{4})_"); >+ private static final Pattern utfPtrn = Pattern.compile("_x([0-9A-Fa-f]{4})_"); > > private CTRst st; > private StylesTable styles; >Index: src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java >=================================================================== >--- src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java (revisión: 1765824) >+++ src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRichTextString.java (copia de trabajo) >@@ -236,6 +236,11 @@ > //_x000D_ is converted into carriage return > assertEquals("abc\r2ef\r", rt.getString()); > >+ // Test Lowercase case >+ CTRst st2 = CTRst.Factory.newInstance(); >+ st2.setT("abc_x000d_2ef_x000d_"); >+ XSSFRichTextString rt2 = new XSSFRichTextString(st2); >+ assertEquals("abc\r2ef\r", rt2.getString()); > } > > public void testApplyFont_lowlevel(){
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60289
:
34397
| 34398