ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: Earl H. Kinmonth on January 08, 2013, 04:36:40 PM

Title: multibyte file names
Post by: Earl H. Kinmonth on January 08, 2013, 04:36:40 PM
Exiftool mangles multibyte file names (Japanese in my case).  My guess is that the file parsing mechanism (that which splits the file name from the whole path name) is not using wide character routines or the character constants for path part separators (slash or backslash) are not specified as wide character constants.  Because slash or backslash can be an element of a multibyte character sequence, to properly parse a path name using multibyte characters, all routines need to be wide character and all constants need to be specified as wide character.  (This is, of course, a reference to Windows.)  If not, you get something like this

/dirt/dirt/dirt/file

comes out as

/dirt/dirt/dirt/ ile

or

/dirt/dirt/dir ile

or some other mangled pattern. 

EHK
Title: Re: multibyte file names
Post by: Phil Harvey on January 08, 2013, 05:57:21 PM
Thanks for the report, however the problem is deeper than this in Windows.

In Mac and Linux this works fine because these operating systems use UTF-8 (and multi-byte UTF-8 can not contain a slash or backslash).

In Windows, the problem is not easily solvable without rewriting ExifTool to use Windows-specific file I/O routines.  Here is a discussion of this problem. (https://exiftool.org/forum/index.php/topic,3155.0.html)

- Phil