f



Tk::ROText: selection conversion left too many bytes unconverted

Hi folks,

I_m using perl 5.8.7 + Tk 800.027 and when i select some text in the
Tk::ROText widget and try it to copy somewhere else, my perl program
will crash with the message: "selection conversion left too many bytes
unconverted".

The problem occures, if I have ISO8859-1 characters (german umlauts)
written to the widget, anyway, the characters are displayed correctly.

I did it on RHEL4 displaying on Windows with X-Manager (from netsarang).
I also tried it on SuSE Linux 6.2 on buildin XServer (Perl/tk extra
compiled for that). Results were just the same :-(

I couldn't find anything googling for that, except some others which 
had the same problem w/o any useful solution.

What can I do, to be able use Copy&Paste out of my Text widgets ?

with best Regards,
Peter

0
Peter
9/28/2006 8:20:10 AM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

2 Replies
279 Views

Similar Articles

[PageSpeed] 20

Peter Sobisch <petersob@gmx.net> schrieb:
> Hi folks,
>
> I_m using perl 5.8.7 + Tk 800.027 and when i select some text in the
> Tk::ROText widget and try it to copy somewhere else, my perl program
> will crash with the message: "selection conversion left too many bytes
> unconverted".
>
> The problem occures, if I have ISO8859-1 characters (german umlauts)
> written to the widget, anyway, the characters are displayed correctly.

I found out, that the german umlauts doesn't matter, but,
the size of the selected text does. If I try to select more than 4000
bytes, I'll get the error message mentioned above.

Any Ideas ? 
Is it a bug in Tk ?

regards,
Peter
0
Peter
9/29/2006 4:50:08 AM
Peter Sobisch <petersob@gmx.net> schrieb:
> Peter Sobisch <petersob@gmx.net> schrieb:
>> Hi folks,
>>
>> I_m using perl 5.8.7 + Tk 800.027 and when i select some text in the
>> Tk::ROText widget and try it to copy somewhere else, my perl program
>> will crash with the message: "selection conversion left too many bytes
>> unconverted".
>>
>> The problem occures, if I have ISO8859-1 characters (german umlauts)
>> written to the widget, anyway, the characters are displayed correctly.
>
> I found out, that the german umlauts doesn't matter, but,
> the size of the selected text does. If I try to select more than 4000
> bytes, I'll get the error message mentioned above.
>
> Any Ideas ? 
> Is it a bug in Tk ?

just found it on the web:

in Tk.pm:

$Tk::encodeFallback = Encode::FB_PERLQQ;

which means: PERLQQ + LEAVE_SRV (=0x108) => causes the behaviour, 
but changed to:

$Tk::encodeFallback = Encode::PERLQQ; 

which means: PERLQQ (=0x100) => does it fine !

Now I've just to find out for myself what is the better way to I patch that: 
in Tk.pm or in each particular script using Tk::Text.

regards
Peter

0
Peter
9/29/2006 9:57:40 AM
Reply:

Similar Artilces:

Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection
Hi all, I've written about this before, but it's come back and I still haven't found what the problem is. Basically, in Perl/Tk if a textbox has a lot of text in it (no idea on the limit yet - all I know is that it has to be a _lot_ of text), and all the text is selected (and therefore copied to the clipboard) the entire perl process is halted, the gui disappears and the error: selection conversion left too many bytes unconverted appears on the command line. This appears to be a tcl panic error (hence the cross-post to comp.lang.tcl as I'm not sure where the problem i...

Solution [ Perl/Tk: 'selection conversion left too many bytes unconverted' error on large text selection ]
After I got bitten enough by this error and found no solution on the web I had to debug it myself. For me it looks like the following: - text get selected from Tk::Text - TkSelPropProc in ./pTk/mTk/unix/tkUnixSelect.c gets called to handle the selection which determines that the display supports utf-8 and thus gets Encoding::utf8 as the responsable encoder (see Encode::Encoding for the interface) - then it calls Tcl_UtfToExternal to convert the selection from internal format to utf8, this function is defined in encGlue.c and just calls CallEncode in the same fil...

Weird and downright annoying error: 'selection conversion left too many bytes unconverted'
Hi all, We recently upgraded our systems including a perl upgrade to version 5.8.7. I've noticed some damn weird things, but so far only one has affected Tk. If I have a text box with a certain number of characters in it (no idea how many - the example this is happening with is a few hundred lines long) and I then select all the text, perl bails (instant tear-down of the gui) but all that is printed to stderr is: selection conversion left too many bytes unconverted A google search finds this is a Tk panic error, but that's about all I can find. No help in some w...

Linux Perl-TK -> Win32 Perl-Tk
I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would like to run on my Win32 laptop. I am not interested in dual-booting this laptop but would like to get the app up an running. I'm a perl-Tk hack at best. What is the best/easiest way to port the application? thanks, Mike On Tue, 21 Dec 2004 03:01:21 +0000, Michael Seningen wrote: > I've got an app that I wrote in Perl-Tk for Linux (Redhat) that I would > like to run on my Win32 laptop. > > I am not interested in dual-booting this laptop but would like to get > the ap...

Perl/Tk and Tk 8.5
Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, better-looking widgets) will be made available in the Perl/Tk port? I know that ActiveState has made some of this available for awhile in the "Tkx" module, but I'm interested in cross-platform support and am wondering when 8.5 will be incorporated in the base "Tk" port module. [Cross-posted to comp.lang.perl.tk with follow-ups set to go there.] Steve wrote: > Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, > better-looking widgets) will be made available in the P...

perl -e "use Tk" failed after installing perl tk
Now I want to debug perl script through ptkdb under Windows XP. I installed perl tk 804.028 using the below command first because ptkdb depends on perl tk. ppm install Tk But some errors pop out when the command(perl -e "use Tk") exec after installing perl tk, " Can't locate Tk.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/ lib .) at -e line 1. BEGIN failed--compilation aborted at -e line 1. " ActivePerl: Build 1004 Perl: 5.10.0 On 19 mai, 15:30, Erik <zhengfen...@gmail.com> wrote: > Now I want to debug perl script thro...

switching Tk::Text / Tk::ROText
Hi, thinking about Frank Kulows last posting, I was looking for a way to switch a Text widget from Text to ROText and backwards. Here is where I ended: It's still not really satisfactory, because both classes have to be initialized first (either by calling 'ClassInit' manually or by creating a 'dummy' instance). Also rebuilding the menu does not look very elegant. This is partial due to the way Tk::ROText changes the default 'Search' menu, deleting the 'Replace' entry after initialization instead of providing a Tk::ROText::SearchMenuItems metho...

Bug in perl tk (Tk::Tree) ?
Hello, This simple script below... ------------------------------------------------------------ #!/usr/bin/perl -w use strict; use warnings; use Tk; use Tk::widgets qw/Tree ItemStyle/; my $mw = MainWindow->new(); $mw->fontCreate("MyFont", -family=> 'helvetica', -size => 9, -weight=>'medium'); my $t = $mw->Tree()->pack(); $t->ItemStyle('imagetext', -stylename => 'foobar', -activeforeground => '#ff0080', -font => 'MyFont', ); $t->add('root', -style => &...

Perl/Tk Novice....Tk Error ...Help!
Hi, Does anynody know and understand the following Tk error - Possible precedence problem on bitwise ^ operator at .../blib/lib/Tk/Scale.pm (autosplit into .../blib/lib/auto/Tk/Scale/Increment.al) line 242. I'm trying to get a scale value when I click on the slider. Are there any simple examples of all the pre-ambles required to set up a slider on a canvas and capture the input from the user ? Any pointers would behighly appreciated. Thanks much in advance, Nash nrg@ornl.gov ...

Porting tk extensions to perl/tk how-to guide
We have a few tk extensions involving direct xlib calls. Is there any cookbook approach to converting these extensions to perl/tk extensions, or any general description of the process? ...

Tcl/Tk to Perl/TK Translation Problem
Hello, I am having problems translating the following tcl/tk code to perl/tk: ============ tcl code ============ label .controls.sizel -text "Size:" grid .controls.quall .controls.quallo .controls.qual .controls.qualhi -sticky ew grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg -sticky ew grid .controls.colorl .controls.color -sticky ew grid configure .controls.color -columnspan 3 grid configure .controls.quall .controls.sizel .controls.colorl -sticky e grid configure .controls.quallo .controls.sizesm -sticky e grid configure .controls.qualh...

perl tk equivilent to Tcl/Tk fitToContents
Is there a perlTk equivilent to the TclTk fitToContents command you can run on a window. By default it seems that it automatically dits to contents for me, until a user does a manual resize, then it stops... Randell Pelak wrote: > Is there a perlTk equivilent to the TclTk fitToContents command you > can run on a window. By default it seems that it automatically dits > to contents for me, until a user does a manual resize, then it stops... So once the user sets the window the way they want, you're going to change it? Not very user friendly. You could just make the ...

Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk)
A set of modules that allow easy mixing of code types to be interpretted as a Tk application... The input is in MIME-multipart/mixed format, and easy entity can be markdown (displayed formatted in a Text with options to add Tk windows and behaviours), perl (eval()ed), yaml (structure made available to app) or menu in yaml (posted on main mindow). The purpose of this is to contribute to a compiled program (for Windows/Mac/Linux) that can run appended scripts in this format. The reason for having this format is that resources can be included in the one file. The Markdown stuff...

Does Ruby/Tk have all features as perl/Tk or java swing?
Hi I am perl and java programmer. I want to make a quite complex application using a lot GUI components like Spreadsheet, Menu, Tab etc..in Ruby. I have tried Ruby for some simple non-GUI applications and really like the language. It will be time consumming if I start to write software in Ruby and later find out that it lacks this and that. So someone have worked much with Ruby/Tk can answer my questions. 1. Does Ruby/Tk have all features as perl/Tk or java swing? 2. Does Ruby have features like Java Applet running in a web browser? 3. JRuby is an interpreter that I can run both java and ...

Web resources about - Tk::ROText: selection conversion left too many bytes unconverted - comp.lang.perl.tk

Resources last updated: 2/2/2016 6:29:41 PM