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 116986 - I18N - template encoding problem
Summary: I18N - template encoding problem
Status: RESOLVED DUPLICATE of bug 104770
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-09-27 21:56 UTC by jn
Modified: 2008-12-22 11:26 UTC (History)
1 user (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 jn 2007-09-27 21:56:14 UTC
This is reported against NB6.0b1.  Copied from nbusers:

> -----Original Message-----
> From: Wulfy [mailto:wulfmann@tiscali.co.uk]
> 
> Jim Newsham wrote:
> >
> > There seems to be a minor (character encoding?) bug related to the 
> > script processing.  Our license (like most) uses the copyright 
> > symbol (a c with a circle around it).  When I put our license into 
> > the Default License template and create a new Java class which uses 
> > this template, the c-circle character becomes two characters:  A-hat 
> > (A joined with diacritical ^) followed by c-circle.  All of the 
> > other license text looks fine.
> >
> That happens when you try to interpret a file written in utf-8 as 
> ISO-8859-1.  It's an encoding problem...

Okay.  Would this be a bug then?  I just edited the Default License template, I didn't create the file myself or specify
an encoding somewhere, so shouldn't the editor do the right thing here?

I noticed the project properties now has a selection for encoding (for a "project with existing ant script").  Right now
it says "<No Encoding>"...  not sure what that even means, since every file has an encoding.  This is for a project
which was created with NB 5.5.1 and then opened with NB6.0b1 when I upgraded two days ago.
Comment 1 Ken Frank 2007-10-03 20:02:22 UTC
there are some other issues related to templates and encoding; i need to find them and add ids here.

about the nb5.x project who is opened in nb6, the encoding prop should be set to that of the locale the user is in,
not with <no encoding>

can you tell me:

1. does this happen if you open an other kind of nb5.x project ?

2. what locale you are in, and if you are on xp, if the locale name is chosen on first and third tabs
of the regional settings window ?

3. what is the locale and encoding value from <userdir>/var/log/messages.log.

thanks

ken.frank@sun.com

ken.frank@sun.com
Comment 2 jn 2007-10-10 21:44:55 UTC
Hi Ken.  Thanks for looking into this, and sorry for the slow response.

1.  I created a project of type "Java Application", and the same problem happens.

2.  I am in USA, so I expect my locale to be en_US.  Checking the regional settings in the windows xp control panel...
the first tab has "English (United States)" for standards and formats, and "United States" for location.  The third tab
has "English (United States)" for languages for non-unicode programs.

3.  From messages.log:

>Log Session: Wednesday, October 10, 2007 10:35:14 AM HST
>System Info: 
  Product Version         = NetBeans IDE 6.0 Beta 1 (Build 200709141330)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105; Sun Microsystems Inc.
  Java Home               = C:\Program Files\Java\jdk1.6.0\jre
  System Locale; Encoding = en_US (nb); Cp1252
Comment 3 Ken Frank 2007-10-10 22:09:50 UTC
Jim,

thanks for the info.


I am wondering if 104770 might be related to this,
since it mentions about templates that include other templates
and I think that is what you are referring to below ?

one more question - what is the project encoding property of your project ?
see project properties for this info.

and if its utf-8 which is the default, and  you change the encoding to that of say cp1252
and then create a *new* project (dont use same one here), does the same problem happen ?

again, it may not change if this is related to 104770.

thanks - Ken

ken.frank@sun.com
Comment 4 jn 2007-10-11 01:15:55 UTC
1.  As stated before, the project encoding for my original "project from ant script" created in NB5.5.1 and opened in
NB6b1 is "<No Encoding>".  I don't know what this means.
2.  The project encoding for the test project of type "java application", which I created in NB.5.5.1 and opened in
NB6b1 (per your request), and which also exhibited the same problem, is windows-1252.
3.  I just created a new project of type "java application" directly within NB6b1.  I notice that the project defaulted
to encoding UTF-8.  It exhibits the same encoding problem as described for the other scenarios.  I then changed the
encoding of this project to windows-1252 and confirmed that it exhibits the same problem.

Yes, this is a template which includes another template ("Java Class" includes ../Licenses/license-default.txt), so it's
quite possible this is the same bug as #104770.
Comment 5 Jaroslav Tulach 2007-10-19 10:36:48 UTC
Problem with non ascii symbol in license.txt is indeed duplicate of issue 104770.

*** This issue has been marked as a duplicate of 104770 ***