diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2014-12-27 01:33:28 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2014-12-27 01:33:28 +0000 |
commit | b91e4800060c9d1748007d921b60e36c62e2377e (patch) | |
tree | 84fff9e96a17cf25c7f67cdbc442a78cce06ecf9 /src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java | |
parent | 70d7ec0e693a2de9a7c6540e2fec300b756ecccc (diff) | |
download | poi-b91e4800060c9d1748007d921b60e36c62e2377e.tar.gz poi-b91e4800060c9d1748007d921b60e36c62e2377e.zip |
Charset.forName() for known encodings makes catching UnknownEncodingException obsolete
Unify UTF-16LE conversion to StringUtil
BugFix for RecordInputStream.readFully in combination with continuing records
BugFix for integration tests - fix pathname for handler/exclude lookup on windows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1648032 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java')
-rw-r--r-- | src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java index b197123935..ca0caf5b0e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestOfficeDrawings.java @@ -23,6 +23,7 @@ import org.apache.poi.ddf.EscherContainerRecord; import org.apache.poi.ddf.EscherOptRecord; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.HWPFTestDataSamples; +import org.apache.poi.util.StringUtil; /** * Test cases for {@link OfficeDrawing} and {@link OfficeDrawingsImpl} classes. @@ -48,7 +49,7 @@ public class TestOfficeDrawings extends TestCase EscherComplexProperty gtextUNICODE = (EscherComplexProperty) officeArtFOPT .lookup( 0x00c0 ); - String text = new String( gtextUNICODE.getComplexData(), "UTF-16LE" ); + String text = StringUtil.getFromUnicodeLE(gtextUNICODE.getComplexData()); assertEquals( "DRAFT CONTRACT\0", text ); } } |