Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Big widget problems from perl 5.6 to 5.8

14 views
Skip to first unread message

Franck ANIERE

unread,
Sep 30, 2006, 4:10:59 AM9/30/06
to
Hello,

I use Active Perl for my Windows based perl/tk scripts. Until
last month, I used perl 5.6 but I have switched recently
to perl 5.8, in order to have the most recent perl/tk
(I needed tk::png for example). And now the problems begin.

1) As you may I have noticed, I am French. So sometimes I
have some directories spelled with french symbols (ç, é,...)
and while it posed no problems with perl 5.6, it does not work
with perl 5.8 (I can't open files located in such directories)

2) I use perlapp to make my scripts executables. Now that I use
perl 5.8 (perlapp not changed), I have the following errors on
stderr when the username on Windows contains french caracters :

Tk::Error: couldn't read bitmap file
"C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\/Tk/arrowdownwin.xbm":
No such file or directoryerror reading bitmap file
"C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\/Tk/arrowdownwin.xbm"
at /PerlApp/Tk/Widget.pm line 205.
at /PerlApp/Tk/Widget.pm line 203
Tk callback for .toplevel3
Tk callback for .toplevel3.browseentry.labentry
(processing "-bitmap" option)
Tk callback for .toplevel3.browseentry.button
<Button-1>
(command bound to event)

It happens with screens containing browseentry widgets. I have tried to
force the temporary directory with tmpdir switch on perlapp, but it
still creates the pdk-françois subdirectory, so it does not solve anything.

I have been told that perl 5.8 internal encodings are different from
perl 5.6 ones. Is there a way to force perl 5.8 to act "like before"
(especially for widget related issues) ?

Thank you very much in advance for your help, I'm going mad with this
problem :(

Best regards,

F.A.

zentara

unread,
Sep 30, 2006, 7:13:00 AM9/30/06
to
On Sat, 30 Sep 2006 10:10:59 +0200, Franck ANIERE <ani...@yahoo.com>
wrote:

Hi, I ran into a similar problem awhile back, where I encountered
extended ascii characters in some filenames, and the files were
not recognized.

This is the essence of what you need to do. Just call
decode('utf8', ....) on the files, and Perl will automatically
tag them properly.

#this decode utf8 routine is used so filenames with extended
# ascii characters (unicode) in filenames, will work properly
use Encode;
opendir my $dh, $path or warn "Error: $!";
my @files = grep !/^\.\.?$/, readdir $dh;
closedir $dh;
# @files = map{ "$path/".$_ } sort @files;
#$_ = decode( 'utf8', $_ ) for ( @files );
@files = map { decode( 'utf8', "$path/".$_ ) } sort @files;


perlmonk graff's full answer is at:
http://perlmonks.org?node_id=537023

This page may be useful to you also
http://perlmonks.org?node_id=542272

zentara


--
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html

Franck Aniere

unread,
Oct 2, 2006, 3:46:21 AM10/2/06
to
Hello,

zentara wrote:
> On Sat, 30 Sep 2006 10:10:59 +0200, Franck ANIERE <ani...@yahoo.com>

>

> Hi, I ran into a similar problem awhile back, where I encountered
> extended ascii characters in some filenames, and the files were
> not recognized.
>
> This is the essence of what you need to do. Just call
> decode('utf8', ....) on the files, and Perl will automatically
> tag them properly.
>

Thanks a lot for your help, but it still does not work :(

If I can get perl/tk 804.x (with tk-JPEG/Tk-PNG included) to work
correctly on perl 5.6, I think I will go back to 5.6 :(

Best regards,

F.A.

Franck Aniere

unread,
Oct 2, 2006, 4:22:44 AM10/2/06
to
Franck Aniere wrote:

>
> If I can get perl/tk 804.x (with tk-JPEG/Tk-PNG included) to work
> correctly on perl 5.6, I think I will go back to 5.6 :(

Hmmm, I have seen that PPMs for this are not available for 5.6, so I
guess I'll have to find a cure under 5.8 :(

Q...@domain.invalid.com

unread,
Oct 2, 2006, 7:40:03 AM10/2/06
to

zentara <zen...@highstream.net> wrote in message-id:
<phjsh2tprokndoroi...@4ax.com>
>http://perlmonks.org?node_idS7023

>
>This page may be useful to you also
>http://perlmonks.org?node_idT2272

>
>zentara
>
>
>--
>I'm not really a human, but I play one on earth.
>http://zentara.net/japh.html

just glancing at the error, half awake here, but this seems to be a invalid
path to me.

"C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\/Tk/arrowdownwin.xbm"

^
should be?

"C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\Tk/arrowdownwin.xbm"
^

Franck Aniere

unread,
Oct 4, 2006, 3:39:43 AM10/4/06
to
Q...@domain.invalid.com wrote:

>
>
> just glancing at the error, half awake here, but this seems to be a invalid
> path to me.
>

> "C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\/Tk/arrowdownwin.xbm"
> ^
> should be?
>
> "C:\DOCUME~1\FRANOI~1\LOCALS~1\Temp\pdk-François-2096\Tk/arrowdownwin.xbm"
> ^
>
>
>

Well, it is not the cause apparently.

Searching the web deeply, I found something telling that it is a know
bug from perlapp (unicode in temp path gets the script to fail working).

And Active State support also told me not to use unicode in file paths,
as it does not work well with perl 5.8.

Thanks to everyone who helped me.

Best regards,

F.A.

0 new messages