Commits

Olemis Lang committed dacf908

GViz QL : Convert to unicode before comparing starts/ends with . Refs #121

Comments (0)

Files changed (1)

trac-dev/gviz/tracgviz/gvizql.py

 
       f = {
           '/' : div, 
-          'starts with' : lambda a, b : a.startswith(b),
-          'ends with' : lambda a, b : a.endswith(b),
+          'starts with' : lambda a, b : to_unicode(a).startswith(to_unicode(b)),
+          'ends with' : lambda a, b : to_unicode(a).endswith(to_unicode(b)),
           'matches' : lambda a, b: bool(match('^%s$' % (b,), a)),
           'like' : match_like,
         }.get(op)