diff options
author | Rainer Klute <klute@apache.org> | 2004-08-31 20:42:12 +0000 |
---|---|---|
committer | Rainer Klute <klute@apache.org> | 2004-08-31 20:42:12 +0000 |
commit | 5592ae14bf108d74d13865ac367efe7afdaf1ab4 (patch) | |
tree | 1a34916c466c77e2f49a78b2c34310eeea92df1a /src/java | |
parent | 9678a33637385bd14680f830961c3be0c0c341cd (diff) | |
download | poi-5592ae14bf108d74d13865ac367efe7afdaf1ab4.tar.gz poi-5592ae14bf108d74d13865ac367efe7afdaf1ab4.zip |
- Bug 30954 fixed.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/org/apache/poi/hpsf/MutableProperty.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/hpsf/MutableProperty.java b/src/java/org/apache/poi/hpsf/MutableProperty.java index 1aa603a4ab..e80644b197 100644 --- a/src/java/org/apache/poi/hpsf/MutableProperty.java +++ b/src/java/org/apache/poi/hpsf/MutableProperty.java @@ -108,6 +108,11 @@ public class MutableProperty extends Property { int length = 0; long variantType = getType(); + + /* Ensure that wide strings are written if the codepage is Unicode. */ + if (codepage == Constants.CP_UNICODE && variantType == Variant.VT_LPSTR) + variantType = Variant.VT_LPWSTR; + length += TypeWriter.writeUIntToStream(out, variantType); length += VariantSupport.write(out, variantType, getValue(), codepage); return length; |