Finally, it seems that I'm bound to 'latin-1' encoding. I changed line 56 in dTextBox.py, in onTextKeyChar() section in the demo:
cd, ch = evt.keyCode, evt.keyChar for this one: cd, ch = evt.keyCode, unicode(evt.keyChar, 'latin-1') and now runs fine and logit() displays a beautiful a-acute. More, unicode(evt.keyChar, 'utf-8') doesn't work. But, please, if anybody has a better approach, make me know it. I have a conceptual confusion with this encodings stuff. For example, if I put the line # -*- coding: latin-1 -*- on all the affected demo modules, will it works as is? Greetings Melkarth -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Henning Hraban Ramm Sent: viernes, 20 de mayo de 2011 11:01 To: Dabo list Users Subject: Re: [dabo-users] Reenv: Problem in Dabo demo Am 2011-05-20 um 09:06 schrieb melkarth0: > Ok, thank you, Hraban. I've already checked that dTextBox works fine > outside the dabo demo; I'm worried about it no more. I'll try to play > with your solution, but my priority now is to keep learning Dabo. But since you're learning Python as you go, it might be a good example to keep attention to Python's quirks like ASCII vs. Unicode "strings". Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected] t _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
