> From: Al Niessner <[EMAIL PROTECTED]> > To: "generateds-users@lists.sourceforge.net" > <generateds-users@lists.sourceforge.net> > Sent: Monday, December 1, 2008 11:37:48 AM > Subject: [Generateds-users] Unicode problem > > > I am having some minor problems with the decoding of the XML that is > being streamed to me. One of the XML messages generates the following > error: > > (, UnicodeEncodeError('ascii', > u'10000[\xb5s]\n', 15, 16, 'ordinal not in > range(128)'), ) > > The offending character is the micro symbol for ten thousand > microseconds. I had a very similar problem with Java until I defined the > correct encoding with -Dfile.encoding=iso-8859-1. I know Python is not > Java, but is there a similar thing to do with Python? Do I have to find > where the strings are being decoded in the generateDS generated code and > change it there? > > Anyway, this seemed like the place to start and I will branch out from > there. Thanks.
Where in your generated code does this error occur? Is it in one of the export methods? If so, you might consider looking at the generateExportXXX functions in generateDS.py, for example: - generateExportFn, generateExportFn_1, ... - generateExportAttributes - generateExportChildren - generateExportLiteralFn, ... Or, does the error occur while generateDS.py itself is running? - Dave -- Dave Kuhlman http://www.rexx.com/~dkuhlman ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users