Hello,

My system is Windows 7 Home + C:\Python 
2.7\Lib\site-packages\Dabo-0.9.3-py2.7.egg\dabo.

I am new.

I read with interest the dabo-users emails on Thai and Japanese locales. 
Especially when the Thai emails are so recent, and we have similar problems. I 
do not know how to link to those emails so I would start a new email now.

Dabo could be installed through “setup.py install”. No error with “import dabo” 
at python, but dabodemo.py could not run. The error message was “No translation 
file found ... Language = [‘zh_HK’] .. Codeset = cp950”, similar to that 
discussed for Thai, but a different “LookupError”:

“File ... dabo\lib\DesignerClassConverter.py”, line 383, in createClassText” 
“self.classText = ct.encode(self._encoding)”
“LookupError: unknown encoding: A”

My Windows system locale is “Hong Kong SAR”.

Following the suggestions at the Thai emails:

1.    Copying the locale “en” folder to “zh_HK” does not help.
2.    “import locale ... print locale.getlocale()” gives “(None, None)”.
3.    I cannot find the code “def getEncoding() ...” in “dabo\__init__py”.

After trials and errors, I found the following:

1.    The problem is not with the “system locale” (for non-unicode) of Windows. 
Even when I set that to “English”, the problem still exists. 

2.    The problem is actually with the “format” at Windows’ regional setting. 
If I set it as “English (America)” or “English (Australia)”, there is no error 
message and dabodemo can run.

3.    If I set it as “Chinese (China)”, “Chinese (Singapore)” or “Chinese 
(Taiwan)”, the no translation errors will appear for languages “[zh_CN]”, 
“[zh_SG]” and “[zh_TW]”, all of codeset “cp950”, BUT, dabodemo can proceed to 
run successfully.

4.    If I set it as “Chinese (Hong Kong)” or “Chinese (Macau)” , the no 
translation errors will appear for languages “[zh_HK]” and “[zh_MO]”, both of 
codeset “cp950”, AND the same “LookupError: unknown encoding: A”, and dabodemo 
cannot proceed.

5.    I cannot guess the critical differences between the above two groups of 
Chinese formats that caused the dissimilar behaviour.

6.    For my use on the Windows, the “English (Australia)” format setting is 
closet to our Hong Kong format style ($ for the currencies and dd-mm-yy style), 
so I can settle for that as an interim measure. This would not affect my use of 
Chinese on my computer. The other Chinese settings are not appropriate because 
of the different symbols used for the currencies and date styles.

7.     After getting an interim solution at item 2 above using “English 
(Australia)”, I found that there was a very recent web update of dabo 
apparently dealing with locale. I updated dabo accordingly, unfortunately, this 
time “import dabo” at python did not work, not to mention running dabodemo. I 
had to reinstall the downloaded “zip” file to overwrite the web update in order 
to get dabo working. I then explored further and discovered items 3 and 4. I 
have not ventured back to the web update but roughly remember that the error 
message was something about a “module” does not have a “log” attribute at line 
89 of “dLocalize.py”.

Hope the above report can help resolve the locale issue for the Asian languages.

Regards,

K C Tang


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---
_______________________________________________
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/D2026D17908743988EA5D961FCB6E7C0@KcTangASUS

Reply via email to