For Programmers: Free Programming Magazines  


Home > Archive > PerlTk > September 2005 > Accents in Text widget









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Accents in Text widget
Stephane Roux (HAbeTT)

2005-09-21, 6:58 pm

Hello,

What's wrong with that ?

#!/usr/local/bin/perl-w
use strict;
use Tk;
use Tk::widgets qw(TextUndo);
use locale;

my $window = MainWindow->new();

my $t = $window->TextUndo( -wrap => 'word');
$t->pack(-expand => 1, -fill => 'both');

my $init = "j'ai un é";
$t->insert($init);
$t->focus;

MainLoop();
exit(0);


--
|":._.:"| http://habett.com/
| (=) | http://habett.org/
|\.:':./| Any one can be my master
Jean-Louis MOREL

2005-09-22, 3:57 am

Dans l'article <d221e8ad4d.habett@habett.habett.org>, habett@habett.org a
dit...
>
>What's wrong with that ?
>
>#!/usr/local/bin/perl-w
>use strict;
>use Tk;
>use Tk::widgets qw(TextUndo);
>use locale;
>
>my $window = MainWindow->new();
>
>my $t = $window->TextUndo( -wrap => 'word');
>$t->pack(-expand => 1, -fill => 'both');
>
>my $init = "j'ai un é";
>$t->insert($init);
>$t->focus;
>
>MainLoop();
>exit(0);
>


You forgot the index in the method insert.
Try:

$t->insert('end', $init);

(si vous aviez donné ce bout de code avec votre annonce sur
fr.comp.lang.perl vous auriez eu une réponse ;-)

--
J-L.M.
http://www.bribes.org/perl

Stephane Roux (HAbeTT)

2005-09-22, 7:56 am

In <43326fb3$0$17247$8fcfb975@news.wanadoo.fr>, Jean-Louis MOREL
wrote:

> Dans l'article <d221e8ad4d.habett@habett.habett.org>, habett@habett.org a
> dit...
>
> You forgot the index in the method insert.
> Try:
>
> $t->insert('end', $init);


I meant $t->Insert($init);
^
Remains the problem that on my system (windows XP, ActivePerl last
distro) there's a display problem with the accenttuated letter.

> (si vous aviez donné ce bout de code avec votre annonce sur
> fr.comp.lang.perl vous auriez eu une réponse ;-)


OK je posterais là bas si je n'obtiens pas d'explications ici sur la
gestion des accents qui semble problématique dans le widget Text :)

--
|":._.:"| http://habett.com/
| (=) | http://habett.org/
|.,/:\,.| Another perl tourist hacker
Jack D

2005-09-22, 9:57 pm


"Stephane Roux (HAbeTT)" <habett@habett.org> wrote in message
news:1cfb50ae4d.habett@habett.habett.org...
> In <43326fb3$0$17247$8fcfb975@news.wanadoo.fr>, Jean-Louis MOREL
> wrote:
>
a[color=darkred]
>
> I meant $t->Insert($init);
> ^
> Remains the problem that on my system (windows XP, ActivePerl last
> distro) there's a display problem with the accenttuated letter.
>

Hmm? It works fine on my machine: AS Build 811 5.8.6 and XP.

Jack


Stephane Roux (HAbeTT)

2005-09-23, 3:58 am

In <0TJYe.270190$tt5.45624@edtnps90>, Jack D wrote:

>
> "Stephane Roux (HAbeTT)" <habett@habett.org> wrote in message
> news:1cfb50ae4d.habett@habett.habett.org...
> Hmm? It works fine on my machine: AS Build 811 5.8.6 and XP.


There's a problem with AS 5.8.7 :(

--
|":._.:"| http://habett.com/
| (=) | http://habett.org/
..-'"!"'-. Ton lointain est ton prochain
Radomir Hejl

2005-09-24, 6:57 pm

Stephane Roux (HAbeTT) <habett@habett.org> writes:

>
> There's a problem with AS 5.8.7 :(
>
> --
> |":._.:"| http://habett.com/
> | (=) | http://habett.org/
> .-'"!"'-. Ton lointain est ton prochain


Yes, with Perl 5.8.7 I experienced the same garbled chars while 5.8.6 is ok.
The problem is reportedly related with Tk module. Does anyone know a workaround
for 5.8.7?

--
Radek
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com