- Bug 30954 fixed.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353593 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Rainer Klute 2004-08-31 20:42:12 +00:00
parent 14a93bb98a
commit 740965126b
1 changed files with 5 additions and 0 deletions

View File

@ -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;