As the exception notes, we follow the relevant Python standard re source
Python will default to ASCII as standard encoding if no other encoding hints
There are unit tests in Python to test for compliance specifically about
this, and we pass them. Implementing a property to change the default as a
transition strategy is an interesting idea. You might want to submit a RFE
for this to bugs.jython.org.
There was a transition plan in PEP 263, however, because we skipped to 2.5,
it was not seen in Jython. I think the easiest approach would be to add the
source encoding marker to each included source file. This could be automated
through a simple script. You may be able to use a 3rd party module like
chardet to help here.
On Fri, Aug 21, 2009 at 2:41 PM, <claudef@...> wrote:
> Dear colleagues,
> I´ve got error messages on several Jython source files under Linux. Those
> files have been created under Windows using default encoding UTF-8 and have
> been transferred via ftp in a binary mode to a Suse LINUX system. The Jython
> installed is latest Version 2.5.0 from the official download site. Previous
> Jython like 2.2 did not throw such type of errors and already used UTF-8.
> To my understanding, this is default encoding for Jython.
> Error thrown:
> claudef@...:/opt/projectzero/workspace/ERCmail/jython> jython xxxx.py
> File "<string>", line None
> SyntaxError: Non-ASCII character in file 'xxxx.py', but no encoding
> declared; see http://www.python.org/peps/pep-0263.html for details
> Any idea if there is a utility available to detect the characters, to
> correct and clean them? Maybe there is a Jython setup option for weaker
> validation and auto-clean? Thanks in advance for your feedback.
> Claude Falbriard
> AMS Hortolândia / SP - Brazil
> phone: +55 13 9762 4094
> cell: +55 13 8117 3316
> e-mail: claudef@...
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> Jython-users mailing list
It seems that you are lacking the Lib directory or your program can't
El lun, 24-08-2009 a las 17:18 -0300, claudef@... escribió:
> no codec search functions registered: can't find encoding