Splitting the thread seeing this is separate... On Tue, 2 Feb 2010 13:52:04 -0600 "Edward K. Ream" <[email protected]> wrote:
> On Tue, Feb 2, 2010 at 1:44 PM, Terry Brown <[email protected]> wrote: > > > ok, I fixed it by changing '''blah''' to u'''blah''', don't know why it was > > working for Edward. > > You should have: > > s = gu('''Select the following string: वादक. > This string consists of 4 characters. > Hit do, then undo. > Notice that the selection range is one too big. > ''') > > That should be the only place you need gu. That was where I needed the u before ''', without that qttexttest.py doesn't run for me. And trunk> head -1 leo/test/qttexttest.py # -*- coding: utf-8 -*- so I don't know why not... oh wait, I guess it's simply that in 2.6 '''something''' assumes creation of an ascii string regardless of encoding of the source file. Whatever, it needs the u for me. And while where on the subject, I get Traceback (most recent call last): File "/mnt/usr1/usr1/home/tbrown/.gnome-desktop/Package/leo/bzr/leo.repo/trunk/leo/core/leoAtFile.py", line 3894, in checkPythonSyntax compiler.parse(body + '\n') File "/usr/lib/python2.6/compiler/transformer.py", line 51, in parse return Transformer().parsesuite(buf) File "/usr/lib/python2.6/compiler/transformer.py", line 128, in parsesuite return self.transform(parser.suite(text)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 215-218: ordinal not in range(128) (not just in qttesttext.py) which suggests checkPythonSyntax has a bug. The first line of the file as written is "# -*- coding: utf-8 -*-". Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
