From owner-freebsd-java@FreeBSD.ORG Sat Jun 21 14:03:27 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B369106567C for ; Sat, 21 Jun 2008 14:03:27 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from fallbackmx10.syd.optusnet.com.au (fallbackmx10.syd.optusnet.com.au [211.29.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id CE5DF8FC18 for ; Sat, 21 Jun 2008 14:03:26 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by fallbackmx10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m5KKjiRU024863 for ; Sat, 21 Jun 2008 06:45:44 +1000 Received: from server.vk2pj.dyndns.org (c122-106-215-175.belrs3.nsw.optusnet.com.au [122.106.215.175]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m5KKjfsR000917 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 21 Jun 2008 06:45:42 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.2) with ESMTP id m5KKjfX6078198 for ; Sat, 21 Jun 2008 06:45:41 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m5KKjfhH078197 for freebsd-java@freebsd.org; Sat, 21 Jun 2008 06:45:41 +1000 (EST) (envelope-from peter) Date: Sat, 21 Jun 2008 06:45:41 +1000 From: Peter Jeremy To: freebsd-java@freebsd.org Message-ID: <20080620204541.GA73648@server.vk2pj.dyndns.org> References: <20080316223054.GA46447@server.vk2pj.dyndns.org> <20080317133144.GA4473@misty.eyesbeyond.com> <20080318061525.GQ44676@server.vk2pj.dyndns.org> <20080319060004.GB19887@misty.eyesbeyond.com> <20080419072928.GJ73016@server.vk2pj.dyndns.org> <20080422075855.GA8826@server.vk2pj.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <20080422075855.GA8826@server.vk2pj.dyndns.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: jdk15/javaws on amd64 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jun 2008 14:03:27 -0000 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2008-Apr-22 17:58:55 +1000, I wrote: >The nonsense pathnames look like: >pjdesk% ls -l .java/.userPrefs/remote=20 >total 10 >drwxr-xr-x 3 pjeremy inplat 512 Mar 25 14:53 _!$%!:w!5!#4!:@!4!$g!.g!5!= $%!.g!x!$g!;@=3D I finally got motivated enough to chase this down. After tracking through the Java code, I've found that the above name is really the hostname "139.188.91.185" but, for some reason, Java thinks '.' is not a "safe" character and converts the whole string to a base 64 variant (modified to support case-insensitive filesystems - so only lower- case alphabetics are used). =20 The relevant code is in j2se/src/solaris/classes/java/util/prefs/FileSystemPreferences.java and the filename mapping function states: * Generally, this is just the node name. If the node name includes * inappropriate characters (as per isDirChar) it is translated to Base= 64. * with the underscore character ('_', 0x5f) prepended. isDirChar() is documented as: * Returns true if the specified character is appropriate for use in * Unix directory names. A character is appropriate if it's a printable * ASCII character (> 0x1f && < 0x7f) and unequal to slash ('/', 0x2f), * dot ('.', 0x2e), or underscore ('_', 0x5f). I can understand not wanting '.' as the first char but can anyone suggest a reason for not wanting it elsewhere? Note that the BASE64 variant Java uses includes '.' so it is expanding one string into another string to avoid a char in the first string that can be present in the second string. That's whacky... --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --liOOAslEiF7prFVr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkhcFvUACgkQ/opHv/APuIfqWACfXv8YcV9Bpgjz1DjX0QqqcCeP LooAn3ysqpqTTTYCYzcIft/joa15FO1h =21lE -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--