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 77034 - Jackpot does not support UTF-8 encoded files
Summary: Jackpot does not support UTF-8 encoded files
Status: RESOLVED FIXED
Alias: None
Product: contrib
Classification: Unclassified
Component: Jackpot (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@contrib
URL:
Keywords:
Depends on: 19928
Blocks:
  Show dependency tree
 
Reported: 2006-05-29 18:55 UTC by amotz
Modified: 2006-05-31 21:49 UTC (History)
0 users

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 amotz 2006-05-29 18:55:04 UTC
I use UTF-8 encoded Java sources, mostly for the convenience of using
mathematical symbols as variable names. However,Jackpot does not seem to like
that, and I get a lot of messages that look like:

C:\XmlApplicLtd\JoXer\src\JoXer\Presentation\JxColor.java:103: illegal
character: \177
                                        α = color.getAlpha();
                          ^
Where the funny characters should be a Greek alpha symbol.

I think Jackpot should obey the default encoding in:
Options -> editing -> Java sources -> default encoding
Comment 1 Jesse Glick 2006-05-30 21:33:27 UTC
Currently it can't, I think. There is no API for it. Might be possible using
reflection, I don't know.

Not sure what your options are on Win XP. On Linux you can simply set your
locale to UTF-8 and then all text files will be treated as UTF-8-encoded.
Comment 2 amotz 2006-05-31 06:38:03 UTC
If Jackpot cannot access the editor's configuration, than it should include some
way to accept parameters, similarly to the way javac can be told to accept a
particular encoding.

I stronly feel that this should be resolvable within Netbeans, rather than
outside it, in the OS.

I do not wish to set my XP locale to UTF-8, even if possible, as it would
probably kill dozens of non-Java programs very dead. What I need is for Netbeans
to consistently apply a particular encoding.
Comment 3 _ tball 2006-05-31 16:08:14 UTC
No problem, I'll add support for this option.  Jesse, he's only asking that the
public org.netbeans.module.java.settings.JavaSettings's defaultEncoding value be
used, which the javacore module supports.
Comment 4 Jesse Glick 2006-05-31 18:30:25 UTC
Re. JavaSettings - that is what I meant by "no API" and "reflection".
Comment 5 _ tball 2006-05-31 21:49:17 UTC
Added support for property, by calling the semi-public API
org.netbeans.modules.java.settings.JavaSettings.defaultEncoding().

FYI, we run XP at home with UTF-8 encoding since my children go to a bi-lingual
school.  To paraphrase a common movie disclaimer, no apps were harmed in the
setting of this property. :-)  It's actually a very common encoding for any
English-speaker who has contact with non-English speakers, such as with other
members of the NetBeans community.