Author Topic: multibyte file names  (Read 2344 times)

Earl H. Kinmonth

  • Newbie
  • *
  • Posts: 1
multibyte file names
« 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16724
    • ExifTool Home Page
Re: multibyte file names
« Reply #1 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.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).