Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#32 Support for Unicode in COM failure messages

1.13 Accepted
closed-accepted
nobody
5
2011-10-02
2007-09-14
No

As of 1.13-M3, Jacob doesn't properly convert non-ASCII COM failure messages when creating the Java exception object. This patch fixes that.

Discussion

  •  
    Attachments
  • clay_shooter
    clay_shooter
    2007-09-21

    Logged In: YES
    user_id=1189284
    Originator: NO

    How do we test this patch to make sure it got applied correctly?

     
  • Logged In: YES
    user_id=1150490
    Originator: YES

    How do you test the native code part of Jacob in general?

     
  • clay_shooter
    clay_shooter
    2007-09-21

    Logged In: YES
    user_id=1189284
    Originator: NO

    Usually you write a Java program that talks to some common windows feature or MS office feature that demonstrates the issue/fix. In this case, you'd have to write a program that raises an ole exception, maybe by passing data of the wrong type or something.

     
  • Logged In: YES
    user_id=1150490
    Originator: YES

    Attaching a unit test. The test tries to open a filename with Unicode characters in it and checks that the error message from Word contains the file name. Please check that it actually fails without the patch as I don't have the unpatched Jacob source here at the moment.
    File Added: UnicodeErrorTest.java

     
  • Unit test

     
    Attachments
  • clay_shooter
    clay_shooter
    2007-09-22

    • milestone: --> 1.13 Accepted
    • status: open --> pending
     
  • clay_shooter
    clay_shooter
    2007-09-22

    Logged In: YES
    user_id=1189284
    Originator: NO

    This patch will show up in 1.13M5

    I made one minor change
    <pre>
    msg = (wchar_t*) ::LocalAlloc(LPTR, (wcslen(message_text) + 1) * sizeof(wchar_t));
    wcscpy(msg, message_text);
    </pre>

    became
    <pre>
    size_t bufferLength = (wcslen(message_text) + 1) * sizeof(wchar_t);
    msg = (wchar_t*) ::LocalAlloc(LPTR, bufferLength);
    wcscpy_s(msg, bufferLength, message_text);
    </pre>

     
    • status: pending --> closed
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • clay_shooter
    clay_shooter
    2011-10-02

    • status: closed --> closed-accepted