users
[Top] [All Lists]

Re: [cinjug-users] Unicode in comments?

To: CinJug <users@xxxxxxxxxx>
Subject: Re: [cinjug-users] Unicode in comments?
From: Mike Mills <mike@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Oct 2007 19:40:24 -0400
Delivered-to: mailing list users@xxxxxxxxxx
In-reply-to: <6a216ba20710241403u2f6e1fb3p16696b82517bc21b@xxxxxxxxxxxxxx>
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
Organization: Mike Mills Consulting, Inc.
References: <6a216ba20710241403u2f6e1fb3p16696b82517bc21b@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
Hi Ed,

So, you're saying that the fully qualified class name (with backslashes) is expanded by ClearCase into a Java source comment? Well, its not that you can't have a package or class name beginning with 'u', its just that ClearCase should probably be expanding the path "correctly" by escaping the backslash character: \\xx\\yy\\uu\\zz, for example, or substitute forward slashes instead.

I'm not familiar with ClearCase, but surely there is a way to workaround this problem. Is it Java-aware (well, I guess it must be since it is generating Java comments)? If it is Java-aware and is generating filesystem paths, then it really should (IMO) be escaping the backslash (\\). Perhaps a configuration option? Also, Java on Windows (and, Windows itself, at the OS level) can handle forward slashes just fine, if there is a way to change the behavior in ClearCase.

Let us know what you figure out...

--
Mike Mills
mike@xxxxxxxxxxxxxxxxxxxxxxx


Edward Sumerfield wrote:
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>