This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 225762 - Can't open project from a folder with UTF-8 letters
Summary: Can't open project from a folder with UTF-8 letters
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.2
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Libor Fischmeistr
URL: http://bugs.sun.com/bugdatabase/view_...
Keywords:
: 225519 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-05 18:34 UTC by matimac91
Modified: 2013-05-17 09:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matimac91 2013-02-05 18:34:58 UTC
I can't open any project from a folder that has foreign signs.
I have most files related to 'Dataingeniør' folder (norwegian for Computer Engineer)
I had no problems with Netbeans 7.1, the problem is related to every newer version
(tested up to 7.3 RC1)
Comment 1 matimac91 2013-02-05 18:36:56 UTC
I forgot to say that I'm using OS X 10.8.2
Comment 2 Milutin Kristofic 2013-02-06 13:05:44 UTC
What kind of project it is? Java, Php, C++, ...?
Comment 3 matimac91 2013-02-06 13:07:31 UTC
Java

(In reply to comment #2)
> What kind of project it is? Java, Php, C++, ...?
Comment 4 Milutin Kristofic 2013-02-06 13:15:51 UTC
Thank you. I am moving to java-project category.
Comment 5 hadrabap 2013-02-08 08:13:14 UTC
The issue #225519 maight be related.
Comment 6 Tomas Zezula 2013-02-12 10:15:51 UTC
Works for me with JDK 1.7.0_13; Java HotSpot(TM) 64-Bit Server VM 23.7-b01.
I've created the 'Dataingeniør' folder in the Downloads moved J2SE project into it and opened it with no problem.
Maybe caused by the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003228.
Try to update JDK or add -J-Dsun.jnu.encoding=UTF-8 to netbeans cmd line.
Comment 7 Tomas Zezula 2013-02-12 10:18:00 UTC
For more details see issue #222569 where I've put more info and more ways (sh environment) how to resolve the problem.
Comment 8 Tomas Zezula 2013-02-12 10:45:00 UTC
I've verified the reported behaviour on a fresh Mac OS X 10.8 with JDK 7.
It's caused by the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003228.
the sun.jnu.encoding is set to MacRoman, however it's hard to set it from cmd line (-J-D) as it may be overwritten by JDK.

The only 100% solution to workaround the JDK problem is the set env variable:

export LC_CTYPE=UTF-8

or let the Terminal.app to do it for you Terminal/Preferences/Advcances/Set locale environment variables on startup.

I suggest the safest way to add
export LC_CTYPE=UTF-8
to the beginning of  etc/netbeans.conf

I am reopening the issue even it's a JDK bug but it's questionable if the netbeans launcher should not add the export by default on Mac. It should be something like

if [ x${LC_CTYPE} = x ]; then export LC_CTYPE=UTF-8; fi

not to overwrite the LC_CTYPE which is already set and may be different, eg. MacRoman.
Comment 9 Tomas Zezula 2013-02-12 10:47:38 UTC
*** Bug 225519 has been marked as a duplicate of this bug. ***
Comment 10 matimac91 2013-02-12 11:18:53 UTC
(In reply to comment #8)
> I've verified the reported behaviour on a fresh Mac OS X 10.8 with JDK 7.
> It's caused by the http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003228.
> the sun.jnu.encoding is set to MacRoman, however it's hard to set it from cmd
> line (-J-D) as it may be overwritten by JDK.
> 
> The only 100% solution to workaround the JDK problem is the set env variable:
> 
> export LC_CTYPE=UTF-8
> 
> or let the Terminal.app to do it for you Terminal/Preferences/Advcances/Set
> locale environment variables on startup.
> 
> I suggest the safest way to add
> export LC_CTYPE=UTF-8
> to the beginning of  etc/netbeans.conf
> 
> I am reopening the issue even it's a JDK bug but it's questionable if the
> netbeans launcher should not add the export by default on Mac. It should be
> something like
> 
> if [ x${LC_CTYPE} = x ]; then export LC_CTYPE=UTF-8; fi
> 
> not to overwrite the LC_CTYPE which is already set and may be different, eg.
> MacRoman.

This trick works! Thank you very much!!! :)
Comment 11 Libor Fischmeistr 2013-05-16 11:19:21 UTC
Fixed in http://hg.netbeans.org/core-main/rev/ff5f2d0e4fc8

Note: It happened only when launching like Mac OS app from Finder. When launching from command line using netbeans/bin/netbeans launcher, this problem didn't occurred.

Tomas, thanks for the fix hint.
Comment 12 Quality Engineering 2013-05-17 09:53:21 UTC
Integrated into 'main-golden', will be available in build *201305170640* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ff5f2d0e4fc8
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #225762: Can't open project from a folder with UTF-8 letters