Login  Register

Re: # -*- coding: iso-8859-15 -*- ?

Posted by Leon Espinosa-3 on Sep 02, 2014; 10:10am
URL: http://imagej.273.s1.nabble.com/coding-iso-8859-15-tp5009414p5009462.html

Hello, thank you for these informations. I did not really understand the discussion in stackoverflow, but as it was noted the encoding heading was needed in order to allow the code comments (and automatic documentation of the class) with something different than ascii chars (like in French... !).

Anyway, with "old" Fiji distrubution this works perfect :

# -*- coding: iso-8859-15 -*-
class A_Class(object) :
        """Ceci est une classe dont la doc comporte des: é à ç è """


And with the recent versions this works perfect :

class A_Class(object) :
        """Ceci est une classe dont la doc comporte des: é à ç è """

So it seems that we need to make a choice... and migrate to recent version and modify the scripts. But is not trivial to have all the people using the scripts in the lab with the good couple of Fiji-version/Script-version .

Thank you all for the help

Leon





Le 2 sept. 2014 à 10:31, Bio7 a écrit :

> Hello,
>
> i guess this has something to do with the  ANTLR <http://www.antlr.org/>  
> parser written for a specific Jython version.
> I would guess that the the parser has been changed so that you get a parse
> exception
> because of invalid parsing rules.
>
> Here you can find a related post with an explanation for your declaration:
>
> http://stackoverflow.com/questions/3170211/why-declare-unicode-by-string-in-python
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/coding-iso-8859-15-tp5009414p5009460.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html