# TkVariable and accents

**URL:** <https://www.ruby-forum.com/t/tkvariable-and-accents/193079>\
**Category:** Ruby\
**Created:** [August 10, 2010, 9:35pm UTC](https://www.ruby-forum.com/t/tkvariable-and-accents/193079 "2010-08-10T21:35:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jefff35](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@jefff35](https://www.ruby-forum.com/u/jefff35)\
**Post date:** [August 10, 2010, 9:35pm UTC](https://www.ruby-forum.com/t/tkvariable-and-accents/193079/1 "2010-08-10T21:35:50Z")

</div>

hello,  
I’m working on a small gui, I have a tkEntry, for reading the  
tkEntry.textvariable I have a tkVariable.  
when I enter something as “toto” in the tkentry i get it in the  
tkvariable. but when I enter “té” I get t “tÚ” in the tkvariable.  
how come I get “tÚ”.  
is there a way to handle accents?  
or maybe I shoud use something else than a tkvariable

---

<div class="post-metadata">

**Author:** ![jefff35](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/cab0a1/32.png) [@jefff35](https://www.ruby-forum.com/u/jefff35)\
**Post date:** [August 17, 2010, 12:46am UTC](https://www.ruby-forum.com/t/tkvariable-and-accents/193079/2 "2010-08-17T00:46:01Z")

</div>

From: jefff35 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: TkVariable and accents  
Date: Wed, 11 Aug 2010 04:35:10 +0900  
Message-ID:  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I’m working on a small gui, I have a tkEntry, for reading the  
> tkEntry.textvariable I have a tkVariable.  
> when I enter something as “toto” in the tkentry i get it in the  
> tkvariable. but when I enter “té” I get t “tÚ” in the tkvariable.  
> how come I get “tÚ”.  
> is there a way to handle accents?  
> or maybe I shoud use something else than a tkvariable

I can’t understand your problem, because all of your quoted text is  
“t?” (“t” + question-mark) on my terminal.  
Probably, your trouble depneds on text-encoding.  
Which version of Ruby does you use? What is your locale?  
What encoding name is returned by “Tk.encoding”?
