List Info

Thread: Unicode filenames in Magick++ on Windows




Unicode filenames in Magick++ on Windows
country flaguser name
United States
2007-11-28 14:51:48
How can I open files that have Unicode characters in their
paths?  On 
Mac OS X, passing UTF-8 bytes works just fine but on Windows
this does 
not work.  UTF-16 also fails on Windows, as this encoding
creates 
strings that start with a null byte.

Any pointers?  What encoding can I safely use in the
Image::read() method?

Thanks,

Richard

------------------------------------------------------------
-------------
SF.Net email is sponsored by: The Future of Linux Business
White Paper
from Novell.  From the desktop to the data center, Linux is
going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-helplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gra
phicsmagick-help

Re: Unicode filenames in Magick++ on Windows
country flaguser name
United States
2007-11-28 18:10:04
On Wed, 28 Nov 2007, Richard Crowley wrote:

> How can I open files that have Unicode characters in
their paths?  On
> Mac OS X, passing UTF-8 bytes works just fine but on
Windows this does
> not work.  UTF-16 also fails on Windows, as this
encoding creates
> strings that start with a null byte.
>
> Any pointers?  What encoding can I safely use in the
Image::read() method?

I don't have any good ideas to offer here.  I think that
Windows 
supports UTF-16 via wide characters and alternate APIs. 
Magick++ and 
GraphicsMagick do not support wide characters or
UTF-16-aware APIs. 
Since UTF-8 can be passed via a normal string, UTF-16 could
be handled 
by converting from UTF-8 to UTF-16 right before invoking a 
UTF-16-aware API.

A workaround would be to copy the file to a new name or use
a WIN32 
"legacy" type name (scrambled) to access the file.
 If Windows 
supports the equivalent of a symbolic link
("shortcut"), then this 
could be used to access the problem file.

Bob
======================================
Bob Friesenhahn
bfriesensimple.dallas.tx.us, http://w
ww.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMag
ick.org/


------------------------------------------------------------
-------------
SF.Net email is sponsored by: The Future of Linux Business
White Paper
from Novell.  From the desktop to the data center, Linux is
going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-helplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gra
phicsmagick-help

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )