[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#728658: dogtail: cannot deal with unicode chars in window title



forwarded -1 https://fedorahosted.org/dogtail/ticket/69
thanks

* Yann Dirson [Sun Nov 03, 2013 at 10:44:09PM +0100]:

> Looking for a window with name "omaha - Gliński's Chess":

> Gliński's Chess ...
> activate on [icon | ]
> Traceback (most recent call last):
>   File "./scripts/uitest.py", line 81, in <module>
>     excercise_game(game)
>   File "./scripts/uitest.py", line 24, in excercise_game
>     window = app.window("omaha - " + game)
>   File "/usr/lib/python2.7/dist-packages/dogtail/tree.py", line 1039, in window
>     result = self.findChild (predicate.IsAWindowNamed(windowName=windowName), recursive)
>   File "/usr/lib/python2.7/dist-packages/dogtail/tree.py", line 793, in findChild
>     result = self._fastFindChild(pred.satisfiedByNode, recursive)
>   File "/usr/lib/python2.7/dist-packages/dogtail/tree.py", line 760, in _fastFindChild
>     if pred(child): return child
>   File "/usr/lib/python2.7/dist-packages/dogtail/predicate.py", line 223, in satisfiedByNode
>     return node.roleName=='frame' and stringMatches(self.windowName, node.name)
>   File "/usr/lib/python2.7/dist-packages/dogtail/predicate.py", line 13, in stringMatches
>     return scriptName.matchedBy(reportedName)
>   File "/usr/lib/python2.7/dist-packages/dogtail/i18n.py", line 172, in matchedBy
>     return stringsMatch(self.untranslatedString, string)
>   File "/usr/lib/python2.7/dist-packages/dogtail/i18n.py", line 145, in stringsMatch
>     inString = str(inS)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u0144' in position 11: ordinal not in range(128)

> Obviously, the use of class "str" here is a very bad idea...

AFAICT the relevant code is still present in the version I just
uploaded. I forwarded this bug to upstream:
https://fedorahosted.org/dogtail/ticket/69

regards,
-mika-

Attachment: signature.asc
Description: Digital signature


Reply to: