Q: representing 0 font with characters in text widget 
Author Message
 Q: representing 0 font with characters in text widget

Hi !
        Using tk-perl & particularly the text widget, I was confront
with the pb of representing characters that have no representation
in font used.

How comes that sometimes you have an hexadecimal representation of the
cheracter and sometimes you have nothing.

For example,
use Tk;

$t = (new MainWindow)->Text(-font,'lucidasanstypewriter-24')->pack;

$t->insert('end',"char 127 >\177<\n");
$t->insert('end',"char 128 >\200<\n");

MainLoop;

one can check with xfd that both \177 and \200 seems to have the sames
property, but in the first case you will see \x7f (which takes exactly
one character in the text widget while using for symbol to represent it,
which is seems to be a good comportement), and in the second case, you
will see nothing (for \200).

I don't thing this has to do with perl, but rather with tk,
I guess it has to do with the 8th bit of \200 character

But does any body know how to solve this pb ? (i.e. making \200 be
represented by \x80 in a single character chunk in the widget ?

Thanx !

P.S. : excuse my poor english, but every body answers that he|she would
like their french to be as good as my english, so I never improve it !



Mon, 12 Apr 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Extracting font size ONLY from text widget with -cget

2. Fonts stuff for Text widget

3. PERLFUNC: chr - get character this number represents

4. Non-printable characters in Text widget

5. Tk::Text text width with non-fixed fonts

6. GD, fonts and Danish characters

7. FileSelect Widget - Font

8. Changing font in Label widget

9. Getting a font of a widget

10. Q: Changing Text-Color in Text-Widget?

11. text formatting in a Text widget

12. How update text in text widget when executing some other callback

 

 
Powered by phpBB® Forum Software