File.exists() does not work on mac for non-English characters on Java 7 on Mac
Steve Hannah
steve at weblite.ca
Thu Jan 24 07:23:44 PST 2013
You have to set JAVA_HOME before building . I ran into the same problem.
Steve
On Thursday, January 24, 2013, Paul Taylor wrote:
> On 22/01/2013 21:41, Steve Hannah wrote:
>
>> I just wanted to post my experiences with this bug. I was having
>> trouble on OS X in both 1.7.0u11 and 1.7.0u12 with Japanese file names
>> (File.exists() erroneously returning false).
>>
>> Scott's fix for LC_CTYPE was the only thing that worked for me.
>> (tried file.encoding=UTF8, and sun.jnu.encoding=UTF8 to no avail).
>>
>> As I am deploying to the Mac App store I needed to set this
>> environment variable using the Info.plist file, and the current
>> appbundler ant task didn't have an option to set arbitrary keys/values
>> in the Info.plist, so I modified the appbundler source (I was actually
>> working off of the infinitekind fork of appbundler at
>> https://bitbucket.org/**infinitekind/appbundler<https://bitbucket.org/infinitekind/appbundler>)
>> to automatically set
>> the LSEnvironment key.
>>
> In case it helps Steves fix works if you add the following to Info.plist
> once it has been created by AppBundler
>
> <key>LSEnvironment</key>
> <dict>
> <key>LC_CTYPE</key>
> <string>UTF-8</string>
> </dict>
>
> BTW I tried using infinitekind fork, but there doesn't seem to be a
> prebuilt binary. I downloaded the source and ran ant
> but it complained unable to find gcc. Fixing this is probably obvious to a
> Mac developer but for a Java developer like myself whose main dev platform
> is windows and just knows the minimum about macs
> to get by its a headache.
>
> Paul
>
>
--
Steve Hannah
Web Lite Solutions Corp.
More information about the macosx-port-dev
mailing list