[Pythonmac-SIG] unicode problem w/pyapp 2.5 vs 2.6

has hengist.podd at virgin.net
Sat Feb 21 22:34:08 CET 2009


tom wible wrote:

> i've recently installed 2.6 on my minimac pvr, and it raised a  
> unicode issue:
>
> under 2.5, the filename returned from an applescript.app is plain  
> text:
> [...]
> >>> sfn
> u'New York Goes To War_Jan_17_2009__08_00_26-1_AM.m2t'
> [...]
> but under 2.6:
> [...]
>  >>> sfn
> u'\u4e00\u6500\u7700\u2000\u5900\u6f00\u7200\u6b00\u2000\u4700\u6f00\u6500\u7300\u2000\u5400\u6f00\u2000\u5700\u6100\u7200\u5f00\u4a00\u6100\u6e00\u5f00\u3100\u3700\u5f00\u3200\u3000\u3000\u3900\u5f00\u5f00\u3000\u3800\u5f00\u3000\u3000\u5f00\u3200\u3600\u2d00\u3100\u5f00\u4100\u4d00\u2e00\u6d00\u3200\u7400'
> [...]
> i had simply copied aem from the 2.5 site-packages to the 2.6's...is  
> there
> something i missed in doing that? some data is ok (the dates)

There's a known issue in Python 2.6's Unicode APIs; py-appscript  
0.19.0+ contains a workaround for this.

BTW, Python modules/extensions are not officially binary compatible  
across major Python releases, so you should be installing afresh anyway.

HTH

has
-- 
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net



More information about the Pythonmac-SIG mailing list