Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Netbeans on Windows and UTF-8 source code

Reply
Thread Tools

Netbeans on Windows and UTF-8 source code

 
 
yzzzzz
Guest
Posts: n/a
 
      01-15-2005
Hi,

My source code is in UTF-8. I am using Netbeans and my project won't
compile because the compiler thinks the source code is in ISO-8859-1.

Where can I change the encoding? I have *already* changed it in the
Netbeans options (so it displays right). I have also tried adding
<property name="javac.compilerargs" value="-encoding UTF-8"/> in
build-impl.xml (ant XML file) but it still doesn't compile.

Thank you for your help.

PS.
The error is e.g. on a line where I have
char c = 'é';
The compiler thinks it is
char c = 'é';
but obviously a character can't be 2 characters.
 
Reply With Quote
 
 
 
 
Tilman Bohn
Guest
Posts: n/a
 
      02-23-2005
[xpost and f'up2 clj.softwaretools]

In message <41e97654$0$6937$(E-Mail Removed)>,
yzzzzz wrote on Sat, 15 Jan 2005 21:00:17 +0100:

> Hi,
>
> My source code is in UTF-8. I am using Netbeans and my project won't
> compile because the compiler thinks the source code is in ISO-8859-1.
>
> Where can I change the encoding? I have *already* changed it in the
> Netbeans options (so it displays right).

[...]

I don't use netbeans, but firing it up real quick I see this in the
help text for the Building -> Compiler Types -> Internal Compiler ->
Encoding setting:

- Encoding. Sets the encoding that determines how the compiler
interprets characters beyond the ASCII character set. When you
compile a file, the IDE looks for encoding settings in the following
order:

1. In the settings for the compiler type associated with the
file
2. In the individual file's Encoding property
3. In the Default Encoding property for Java Sources settings
4. The system's default encoding

This leads me to suspect you may have set the encoding in the Java
Sources properties (Expert tab), but either 1. or 2. overrides that
setting. Try setting it there and see if that helps. Otherwise, someone
with more netbeans expertise than me will have to help you out.

--
Cheers, Tilman

`Boy, life takes a long time to live...' -- Steven Wright
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eclipse vs. Netbeans. Netbeans is winning me over almost at first glance. Thomas G. Marshall Java 2 10-16-2006 02:54 AM
Netbeans Source Folders Russell Java 2 05-30-2006 09:41 AM
[NETBEANS] [EVALUATION] - E12 - The NetBeans Open Source Lie Ilias Lazaridis Java 0 12-12-2004 02:41 PM
Building a GUI using NetBeans platform (not Netbeans IDE !) Pimousse Java 2 04-21-2004 07:22 AM
NetBeans + Mac - Text in Source Editor is very light (aliased) Leonard Slatkin Java 0 11-01-2003 06:11 PM



Advertisments