Description: TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. . ldtp (3.5.0-lliurex1) precise; urgency=low . * Upstream version with patch to fix bug with utf-8 names Author: Hector Garcia Huerta Author: Raul Rodrigo Segura --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- ldtp-3.5.0.orig/ldtpd/utils.py +++ ldtp-3.5.0/ldtpd/utils.py @@ -439,8 +439,22 @@ class Utils: Match given string, by escaping regex characters """ # regex flags Multi-line, Unicode, Locale - return bool(re_match(glob_trans(pattern), string, - re.M | re.U | re.L)) + try: + try: + new_pattern=pattern.encode("utf-8") + if new_pattern == string : + return True + except: + pass + ret=bool(re_match(glob_trans(pattern), string, re.M | re.U | re.L)) + return ret + except: + try: + pattern=pattern.encode('utf-8') + return pattern in string + except Exception as e: + print "_glob_match" + raise e def _match_name_to_acc(self, name, acc, classType = None): """ @@ -895,6 +909,8 @@ class Utils: if self._ldtp_debug: print('Window found', gui, name) return gui, name + if type(window_name) == type(u'unicode'): + window_name = window_name.encode('utf-8') if window_name == name: if self._ldtp_debug: print('Window found', gui, name)