klute       2004/08/31 13:42:13

  Modified:    src/java/org/apache/poi/hpsf MutableProperty.java
  Log:
  - Bug 30954 fixed.
  
  Revision  Changes    Path
  1.6       +6 -1      jakarta-poi/src/java/org/apache/poi/hpsf/MutableProperty.java
  
  Index: MutableProperty.java
  ===================================================================
  RCS file: /home/cvs/jakarta-poi/src/java/org/apache/poi/hpsf/MutableProperty.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MutableProperty.java      22 Jun 2004 16:11:39 -0000      1.5
  +++ MutableProperty.java      31 Aug 2004 20:42:12 -0000      1.6
  @@ -108,6 +108,11 @@
       {
           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;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to