Page 1 of 1

Perlmagic and Unicode/utf8 Windows Filenames

Posted: 2013-06-23T11:17:10-07:00
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

Re: Perlmagic and Unicode/utf8 Windows Filenames

Posted: 2013-06-23T16:20:41-07:00
by magick
File paths must be UTF8.

Re: Perlmagic and Unicode/utf8 Windows Filenames

Posted: 2013-06-24T10:39:47-07:00
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

Re: Perlmagic and Unicode/utf8 Windows Filenames

Posted: 2013-06-27T13:52:44-07:00
by marjue
Hi

Does nobody have an example for me?