users
[Top] [All Lists]

Unicode in comments?

To: CinJug <users@xxxxxxxxxx>
Subject: Unicode in comments?
From: "Edward Sumerfield" <esumerfd@xxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2007 17:03:46 -0400
Delivered-to: mailing list users@xxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; bh=KNGyWhj5ezDyQANcrFYC99py9OLgswCprPE/Wdlj318=; b=A2qJIPP9JoyGAn6Nu0M++b3V1T85L/MOfWwpqztW1OnciPuI4HYgmih4cGq6roOik7MUtbE6SF3nlmMwN9OGizoDu4nAtlXiGVsNvdeXLQLJG+zxCKRtfNhB72kFqYfrNbMBJUsnLMBt0hwt6v8hIq0OA6Ayrrc0Mc0pfgP7Ko0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=ElOty8HtMqskS8UrUw7I3uCX+HC+S5ig61AHKk16yAEN419hQ3ft6YA2t5gp0Lv8npPT8KpUtiYT8HIjpJRlbHnoTZkxnyip8BJBmKFXBuE2COUXXDx8qhVy3gx/i0SJzhxjfn7wm1jgAFVO18AIzFeyX6QrBJQucPQF11dpy0I=
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
Reply-to: esumerfd@xxxxxxxxxxxxxx
Sender: esumerfd@xxxxxxxxx
Wow lots of questions this week. I have never seen this before.

/*
 * This is not a valid character \u sequence in a comment
 */
class HelloWorld
{
    // What about in this comment \u
    public static void main(String[] a_args)
    {
        System.out.println("Hello world");
    }
}

This source does not compile in 1.5.0_12 complaining of:

: javac HelloWorld.java
HelloWorld.java:2: illegal unicode escape
 * This is not a valid character \u sequence in a comment
                                 ^
HelloWorld.java:6: illegal unicode escape
    // What about in this comment \u
                                  ^
2 errors

The reason this is a problem is that one of my packages is called "ui" and I have the source control variable replacement thing going on so when the file is retrieved from, in this case ClearCase, the xx\yy \ui\zz package name is expanded and appears with an apparent invalid unicode character.

So we can not have a package or class name beginning with "u"?

--
Ed
<Prev in Thread] Current Thread [Next in Thread>