AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2010

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2010.02.08 12:37 "Libtiff and UTF-8 filename support", by Graeme Gill
2010.02.08 17:03 "Re: Libtiff and UTF-8 filename support", by Bob Friesenhahn

2010.02.08 12:37 "Libtiff and UTF-8 filename support", by Graeme Gill

I was looking though the libtiff V4.0.0beta5 sources, and noticed
that there is probably a discrepancy between the behavior of
Libtiff between MSWindows and Unix like platforms with regard
to filename encoding.

On Unix like systems (tif_unix.c) TIFFOpen calls the open()
with a possibly UTF-8 filename, while in tif_win32.c it calls
CreateFileA(), which doesn't take a UTF-8 argument.

This means that in otherwise platform independent software,
there needs to be some ugly code above libtiff to handle these
two cases

Wouldn't it be better to make TIFFOpen support UTF-8
on both Unix and MSWindows, by making tif_win32.c do
a MultiByteToWideChar() and then use CreateFileW() ?
(or would this create problems in code that expects
there to be differences between the platforms ?)

[TIFFOpenW() could remain for those who have platform
  specific code at that level.]

Graeme Gill.