in reply to Problems Opening file with Perl where path has UTF8
Dang. I need to add CreateFileW() to Win32API::File... ): I thought I had but it was Win32API::Registry that included the *W hooks...
Update: Short of that, I think you are stuck with only 8-bit characters when using open. So your options are likely:
It is too bad that Win32.pm includes GetShortPathName() [which is GetShortPathNameA()] but not GetShortPathNameW().
Update: Yep, I checked the latest Perl source code and open under Win32 hasn't been made smart enough to handle UTF-8 strings.
ikegami mentioned (in the CB) using Win32::API to get access to CreateFileW(), which you could combine with Win32API::File's OsFHandleOpen() to get a Perl file handle to use.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problems Opening file with Perl where path has UTF8 (d'oh!)
by tye (Sage) on Nov 23, 2006 at 03:20 UTC | |
by ikegami (Patriarch) on Nov 23, 2006 at 19:45 UTC | |
by tye (Sage) on Nov 25, 2006 at 08:18 UTC | |
by ikegami (Patriarch) on Nov 25, 2006 at 16:20 UTC | |
|
Re^2: Problems Opening file with Perl where path has UTF8 (sorry)
by Anonymous Monk on Nov 23, 2006 at 18:51 UTC | |
by tye (Sage) on Nov 23, 2006 at 19:35 UTC | |
by dsully (Acolyte) on Nov 24, 2006 at 05:58 UTC |