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
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