2013.03.21 10:49 "[Tiff] TiffOpenW() not opening tiff file containing Japanese character", by Sunanda Chowdhary

2013.03.21 12:59 "Re: [Tiff] TiffOpenW() not opening tiff file containing Japanese character", by Edward Lam

Hi Sunanda,

Which platform are you on? If you're on Windows with Visual Studio, I've personally had problems with it recognizing UTF-8 string literals like in the code you posted. I'd double-check what wname is actually what you think it is. On Windows, you can confirm whether the file can be opened by calling _wopen(wname, ...) and checking if you have a valid file.

The other idea is to ensure you have an error handler installed prior to calling TIFFOpenW() and checking to see what is the error generated by TIFFOpenW().

-Edward

On 21/03/2013 6:49 AM, Sunanda Chowdhary wrote:

I am using TiffOpenW() to open a tiff file containing Japanese character.

Code snippet:

wchar_t *wname = L”C:/test/image名.tif”;
TIFF* tif = TIFFOpenW(wname, "r");

This function returns NULL. Please help me understand what type of path name (UTF-8 or UTF-16 (Unicode)) is it expecting.