El 14/12/2013 13:04, Paul McNett escribió:
On 12/14/13 7:53 AM, Ricardo Aráoz wrote:
Hi, working with DataNav. I have no problems with my app in Ubuntu, but I'm
having
some trouble with accented characters (e.g. "áéíóú") in windows. I think the
problem
is I'm doing something wrong but can't figure out what.
I don't think you are doing anything wrong.
But there must be something wrong here because the dDropDownList shows a weird
character instead of an "ó".
Is wxPython on Windows the "unicode" version? Are you using a non-standard font
in
that dDropdownList?
Solved it.
Modifying the getMadres() method using decode() to :
def getMadres(self):
crs = self.getTempCursor()
crs.execute("""select Id, Nombre
from Cuenta
order by Nombre""")
ds = crs.getDataSet()
Choices = ['No Tiene'] + [reg['Nombre'].decode('utf8') for reg
in ds]
Keys = [None] + [reg['Id'] for reg in ds]
return (Choices, Keys)
Now I think that's an issue.
Shouldn't the TempCursor behave like the rest of the Bizobj? Because in
the bizObject I declare Encoding = "utf-8" and it handles the encoding
stuff for me.
Right now I've solved it, but if I'll be using a browse dialog for
example (I will, and that's my next chore) I will be using a tempCursor
but I'll have a hard time figuring out which fields to decode() as the
fields at that level have already been converted to their appropriate types.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]