Perlmagic and Unicode/utf8 Windows Filenames

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
marjue
Posts: 3
Joined: 2013-06-23T11:00:58-07:00
Authentication code: 6789

Perlmagic and Unicode/utf8 Windows Filenames

Post by marjue »

Hi

I have a Script which is started over the Windows Context Menu (Win7, Active Perl)
C:\Perl64\bin\perl.exe C:\Users\xxx\Desktop\perl-test\ShrinkSharp_hdtv.pl "%1"

In the Script i use:
$image->read("$filename"); ($filename comes from $ARGV[1]
$image->UnsharpMask( radius => "${radius}", sigma => "${sigma}", amount => "${amount}" )

Everything workes fine if the filename/path only uses normal US characters. If there are German characters like ö,ä,ü the UnsharpMask function fails.

If i write the German filename hard coded in the script it worked too (if i save the script in utf-8 encoding). But over @ARGV ... fail!

I tryed this:
use utf8;
binmode(STDOUT, ":utf8");

it didn't work

Can anybody help me
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Perlmagic and Unicode/utf8 Windows Filenames

Post by magick »

File paths must be UTF8.
marjue
Posts: 3
Joined: 2013-06-23T11:00:58-07:00
Authentication code: 6789

Re: Perlmagic and Unicode/utf8 Windows Filenames

Post by marjue »

Hi magick

what do you mean? The $filename variable contains the complete path/filename.

do you have an example for me?


Bye
Marcus
marjue
Posts: 3
Joined: 2013-06-23T11:00:58-07:00
Authentication code: 6789

Re: Perlmagic and Unicode/utf8 Windows Filenames

Post by marjue »

Hi

Does nobody have an example for me?
Post Reply