cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Flowscript encoding weirdness and a solution
Date Fri, 11 Mar 2005 19:08:36 GMT
Sylvain Wallez wrote:
> Hi all,
> 
> I encountered some weird things with a flowscript containing strings 
> with accented characters, saved in UTF-8. This is because the flow 
> interpreter uses the platform's default encoding to read script files. 
> And of course this default encoding isn't the same on Windows and Mac...
> 
> To solve this, I added the possibility to specify the file's encoding as 
> a comment in the very first line of the script, e.g.
> 
>  // encoding = UTF-8
>  function blah()
>  ...
> 
> If no special comment exists, we fall back to the platform's default 
> encoding as of today.
> 
> This works beautifully, and I'm thinking of adding this to 2.1 even if 
> (or especially because) the release is coming soon.

how about

  //@ encoding = UTF-8

instead? so that we can discriminate between comments and 'metadata 
comments'?

-- 
Stefano.


Mime
View raw message