[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Another pylupdate bug
From:       Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date:       2007-06-25 13:10:06
Message-ID: 200706251410.06876.phil () riverbankcomputing ! co ! uk
[Download RAW message or body]

On Friday 22 June 2007 5:03 pm, Giovanni Bajo wrote:
> Try this:
>
> foo.pro:
> =========================
> CODECFORTR = UTF-8
> CODECFORSRC = UTF-8
>
> SOURCES =  foo.py
> =========================
>
> foo.py:
> =======================
> print 'Dir: ',timeme('foobar', 'barfoo')
> =======================
>
> pylupdate4 gives an "unterminated string" error.
>
> Also, it looks like the CODECFORSRC declaration brings it to its knee:
> it becomes abysmally slow, compared to the normal processing mode (or
> there's another infinite loop bug which needs to be fixed...).
>
> BTW, I wonder: am I the first one that wants to use pylupdate with UTF-8
> source Python files? What do other people do?

Fixed in tonight's snapshot. Patch attached for the impatient.

Phil

["pylupdate.patch" (text/x-diff)]

Index: pylupdate/fetchtr.cpp
===================================================================
--- pylupdate/fetchtr.cpp	(revision 950)
+++ pylupdate/fetchtr.cpp	(working copy)
@@ -322,7 +322,7 @@
                                 yyCh = getChar();
                             } else {
                                 QByteArray originalBytes;
-                                while ( yyCh != EOF && (trippelQuote || yyCh != \
'\n') && yyCh != '"' && yyCh != '\\' ) { +                                while ( \
yyCh != EOF && (trippelQuote || yyCh != '\n') && yyCh != quoteChar && yyCh != '\\' ) \
                {
                                     if ( yyParsingUtf8 && yyCh >= 0x80 && !quiet) {
                                         qWarning( "%s:%d: Non-ASCII character \
                detected in trUtf8 string",
                                                 (const char *) yyFileName, yyLineNo \
);



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic