Nick, I've checked my other Dabo installation on a Vista.
Of course, you're right, getEncoding() is in dabo.__init__().
I'll try to figure out, later, what has happened with my other installation 
on Win7.
Maybe I muddled up something while installing it.

--------------------------------------------------
From: "Nick Raptis" <[email protected]>
Sent: Sunday, May 22, 2011 11:54 PM
To: <[email protected]>
Subject: Re: [dabo-users] Reenv:  Problem in Dabo demo

>
> On 05/22/2011 08:03 PM, melkarth0 wrote:
>> Hello, Ed, Hraban and Nick.
>>
>> I've found a nice way to solve the "dabo demo problem" with my
>> "latin-1"="iso8859-1" character set, without changing a single line of 
>> the
>> dabo framework.
>>
>> Simply create a file " sitecustomize.py" under Lib\site-packages in my
>> python directory:
>>
>> # sitecustomize.py
>> # this file can be anywhere in your Python path,
>> # but it usually goes in ${pythondir}/lib/site-packages/
>> import sys
>> sys.setdefaultencoding('iso8859-1')
>>
>> This method "set the current default string encoding used by the Unicode
>> implementation" (Python library reference).
>>
>> Before I made this 'discovery', I've tested Nick's proposal :
>>
>> cd, ch = evt.keyCode, unicode(evt.keyChar, dabo.getEncoding())
>>
>> . . . and :
>>
>>    File "C:\Projects\dabo\demo\samples/dTextBox.py", line 55, in
>> onTextKeyChar
>>      def onTextKeyChar(self, evt):
>> AttributeError: 'module' object has no attribute 'getEncoding'
>>
> Hehe, strange because it's in dabo's __init__.py and surely:
>
> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import dabo
> >>> dabo.getEncoding()
> 'UTF8'
> >>>
>
> Whatever, I'm glad you sorted this out. Will keep your workaround in mind 
> ;)
>
>> It seems that my dabo has no getEncoding() method.
>>
>> The solution Ed gave me :  to put 'settings_override.py' file in demo
>> folder,  with line : defaultEncoding = "latin-1" did not work (no error, 
>> but
>> no different results).
>>
>> Ok, now I'm done with the demo. It goes OK.
>>
>> So I begin exploring the Dabo AppWizard and I've generated the CRUD/File
>> Management form. When I go to see the grid of customers (the Browse tab):
>> lots of wrong characters in the name and address columns!
>> Then, I've entered a new record and -Eureka, it's ok!  -The new record is
>> exactly as I've entered. So, the other records already entered in the 
>> online
>> database were input by other users with other encodings. PHEW! Big 
>> relief.
>>
>> melkarth
>>
> _______________________________________________
> 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] 

_______________________________________________
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/9C44E53D20634B259678675E30429AC2@Informatica2

Reply via email to