Ticket #13504 (closed defect: fixed)
wxOSX-Cocoa bug handling non-ASCII file names
| Reported by: | andrewtrevorrow | Owned by: | csomor |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.9.5 |
| Component: | wxOSX-Cocoa | Version: | 2.9-svn |
| Keywords: | regression wxString non-ASCII file name | Cc: | |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
I've attached a modified version of the dnd sample code to make it easy to see the bug. Replace dnd.cpp with my version, remake dnd.app, start it up and then do these steps:
- Create a file (on the desktop is best) and give it a non-ASCII name by typing something like option-A (å).
- Drag this file to the drop zone (upper left panel) in the dnd window. This sets a global wxString called lastdrop.
- Now select Help > About to get a standard open file dialog and choose the same file. This sets a global wxString called lastopen.
The log messages show that these two strings are NOT the same, even though they look identical when displayed via wxLogStatus. In particular, lastopen is 1 character longer than lastdrop, and if it is fprinted out to the Console via
fprintf(stderr, "lastopen=%s\n", (const char*)lastopen.mb_str(wxConvLocal));
the result is an empty string. This problem does not occur in wxMac 2.8.12. Any idea what is going wrong or how I might work around the problem?

