Hi! I'm a total novice to Dabo and (almost) to Python.
I'm looking for a new tool to make backend programs, I just to use high level 4GL languages, like Progress or Windev.
I just started to read the PyCon tutorial and play with the demo. Looks great!
My question is simple. I have seen a difference between dTextBox and dEditBox: dTextBox in the demo doesn't allow me to type accented vowels in it (returns an error), while dEditBox works fine. The error is:
File "C:\Projects\dabo\demo\samples/dTextBox.py", line 56, in onTextKeyChar
cd, ch = evt.keyCode, evt.keyChar
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128)
I am trying to localize my apps in spanish, so it's not a lot of change, but the range of chars is 256.
In my Python novice code I always write this line: # -*- coding: latin-1 -*- (I don't know if it helps).
I'd like to know if this little problem is difficult to -fix? (It doesn't seem to me, because dEditBox is ok !).
Thanks in advance, and excuse my bad english.
melkarth
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/15093126.848431305757275344.JavaMail.defaultUser@defaultHost
On May 18, 2011, at 6:21 PM, MELKARTH@terra.es wrote:
> Hi! I'm a total novice to Dabo and (almost) to Python.
Welcome to both Dabo and Python!
> I'm looking for a new tool to make backend programs, I just to use high level 4GL languages, like Progress or Windev.
> I just started to read the PyCon tutorial and play with the demo. Looks great!
>
> My question is simple. I have seen a difference between dTextBox and dEditBox: dTextBox in the demo doesn't allow me to type accented vowels in it (returns an error), while dEditBox works fine. The error is:
>
> File "C:\Projects\dabo\demo\samples/dTextBox.py", line 56, in onTextKeyChar
> cd, ch = evt.keyCode, evt.keyChar
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 0: ordinal not in range(128)
>
> I am trying to localize my apps in spanish, so it's not a lot of change, but the range of chars is 256.
> In my Python novice code I always write this line: # -*- coding: latin-1 -*- (I don't know if it helps).
Hmmm.. I just tried entering some accented characters in the demo, and it worked fine in both dTextBox and dEditBox. Can you tell me your version information? You can get it by running the app, selecting the Help/About menu item, and then clicking the Copy button. You can then paste the info into your reply.
> I'd like to know if this little problem is difficult to -fix? (It doesn't seem to me, because dEditBox is ok !).
It might already be fixed - we have a few non-USA people who have been a great help in moving our unicode support forward.
> Thanks in advance, and excuse my bad english.
Your English is fine!
-- Ed Leafe
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/0B654589-F95A-4CD2-9E61-47DFAF911E25@leafe.com
Am 2011-05-19 um 00:21 schrieb MELKARTH@terra.es:
> Hi! I'm a total novice to Dabo and (almost) to Python.
Welcome!
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position
> 0: ordinal not in range(128)
As Ed said, maybe it’s already fixed, but it might be a problem of an
ASCII-only wxPython.
You absolutely need an Unicode-enabled wxPython!
> I am trying to localize my apps in spanish, so it's not a lot of
> change, but the range of chars is 256.
> In my Python novice code I always write this line: # -*- coding:
> latin-1 -*- (I don't know if it helps).
I would never use 8-bit encodings any more. Better use UTF-8 (or plain
7-bit ASCII).
But anyway, the encoding line must fit your real text encoding - you
should be able to set that in your editor.
Greetlings from Lake Constance!
Hraban
---
https://www.cacert.org (I'm an assurer)
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/CABA6149-3009-48EC-AD4D-7E9D5D88A784@fiee.net
Hello, Hraban
I'm having a little mess here with my mail (couldn't reply to posts directly), so I will try a new mail address next time.
I tried UTF-8 in the code, works fine for me, thanks!
My wxPython installed version is wxPython2.8-win32-unicode-2.8.10.1-py25, so I think it's unicode!
Thank you for your quick reply!
Greetings from Barcelona
melkarth
----Mensaje original----
De: hraban@fiee.net
Fecha: 19/05/2011 11:08
Para: "Dabo Users list"<dabo-users@leafe.com>
Asunto: Re: [dabo-users] Problem in Dabo demo
Am 2011-05-19 um 00:21 schrieb MELKARTH@terra.es:
> Hi! I'm a total novice to Dabo and (almost) to Python.
Welcome!
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position
> 0: ordinal not in range(128)
As Ed said, maybe it’s already fixed, but it might be a problem of an
ASCII-only wxPython.
You absolutely need an Unicode-enabled wxPython!
> I am trying to localize my apps in spanish, so it's not a lot of
> change, but the range of chars is 256.
> In my Python novice code I always write this line: # -*- coding:
> latin-1 -*- (I don't know if it helps).
I would never use 8-bit encodings any more. Better use UTF-8 (or plain
7-bit ASCII).
But anyway, the encoding line must fit your real text encoding - you
should be able to set that in your editor.
Greetlings from Lake Constance!
Hraban
---
https://www.cacert.org (I'm an assurer)
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/CABA6149-3009-48EC-AD4D-7E9D5D88A784@fiee.net
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/4191168.858981305802769808.JavaMail.defaultUser@defaultHost
Author: melkarth0
Posted: 2011-05-19 15:03:05 Link
Hello again. My problem with the accented characters in the dTextBox section
of the DaboDemo.py still remains, but, as I am learning dabo quite quickly
thanks to the tutorial, I've adapted a little code.
import dabo
dabo.ui.loadUI("wx")
class HelloPyConForm(dabo.ui.dForm):
def afterInit(self):
self.lblHello = dabo.ui.dTextBox(self, )
app = dabo.dApp()
app.MainFormClass = HelloPyConForm
app.start()
. AND I've checked that dTextBox works like a charm!
Seems that the demo is bugged anyway, but for me that's of a lesser
importance. Don't worry about keeping alive this thread /question (unless
you want to fine-tune the demo, of course ;-).
Thanks for your patience.
melkarth
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/002301cc1657$62fc4ed0$28f4ec70$@gmail.com