[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-scm
Subject:    [jira] Commented: (GROOVY-965) Groovy does not allow UTF-8 encoded names
From:       "Russel Winder (JIRA)" <jira () codehaus ! org>
Date:       2005-07-30 12:53:58
Message-ID: 3929754.1122728038174.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]

    [ http://jira.codehaus.org/browse/GROOVY-965?page=comments#action_43651 ] 

Russel Winder commented on GROOVY-965:
--------------------------------------

I thought Microsoft Windows used UTF-16LE for its file encoding?

Linux and Solaris do not put any file type markers into text files only into binary \
files so for me there is no BOM in any of my Groovy scripts.  The byte content of the \
file is:

0000000   #   !       /   u   s   r   /   b   i   n   /   e   n   v
0000020   g   r   o   o   v   y  \n  \n   d   e   f     303 242 303 270
0000040 303 261 303 250       =       1  \n   p   r   i   n   t   l   n
0000060       (       " 303 242 303 270 303 261 303 250       =       "
0000100       +     303 242 303 270 303 261 303 250       )  \n

or in hexadecimal:

0000000 23 21 20 2f 75 73 72 2f 62 69 6e 2f 65 6e 76 20
0000020 67 72 6f 6f 76 79 0a 0a 64 65 66 20 c3 a2 c3 b8
0000040 c3 b1 c3 a8 20 3d 20 31 0a 70 72 69 6e 74 6c 6e
0000060 20 28 20 22 c3 a2 c3 b8 c3 b1 c3 a8 20 3d 20 22
0000100 20 2b 20 c3 a2 c3 b8 c3 b1 c3 a8 20 29 0a

which I believe is correct UTF-8.


> Groovy does not allow UTF-8 encoded names
> -----------------------------------------
> 
> Key: GROOVY-965
> URL: http://jira.codehaus.org/browse/GROOVY-965
> Project: groovy
> Type: Bug
> Components: parser
> Versions: 1.0-JSR-2
> Environment: Debian GNU Linux Testing, JDK 1.5.0_03, Groovy CVS 2005-07-18
> Reporter: Russel Winder
> Assignee: james strachan

> 
> 
> The Groovy parser does not allow UTF-8 characters only ASCII characters in names \
> whereas Java allows UTF-8 characters.  So whilst the Java program: public class \
> UnicødeName { public static void main ( final String[] args ) {
> final int âøñè = 1 ;
> System.out.println ( "âøñè = " + âøñè ) ;
> }
> }
> works fine, the Groovy script:
> def âøñè = 1
> println ( "âøñè = " + âøñè )
> gives the error message:
> ./unicodeName.groovy: 3: unexpected char: 0xE2 @ line 3, column 5.
> def âøñè = 1
> ^
> 1 Error

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic