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 132522 - UTF8 chars in license (.txt) are not displayed correctly
Summary: UTF8 chars in license (.txt) are not displayed correctly
Status: RESOLVED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@installer
URL:
Keywords:
: 132581 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-10 13:59 UTC by july
Modified: 2008-04-11 11:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
x (54.61 KB, image/jpeg)
2008-04-10 14:00 UTC, july
Details
xx (69.75 KB, image/png)
2008-04-10 14:01 UTC, july
Details
NetBeans IDE license window (33.45 KB, image/png)
2008-04-10 14:18 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description july 2008-04-10 13:59:25 UTC
Netbeans rc1

see att
Comment 1 july 2008-04-10 14:00:03 UTC
Created attachment 59968 [details]
x
Comment 2 july 2008-04-10 14:01:27 UTC
Created attachment 59969 [details]
xx
Comment 3 dlipin 2008-04-10 14:17:17 UTC
The same thing with the license in the IDE. CC-ing Tonda.
Comment 4 dlipin 2008-04-10 14:18:01 UTC
Created attachment 59974 [details]
NetBeans IDE license window
Comment 5 dlipin 2008-04-10 14:43:51 UTC
The issue in NBI is clear for me.
We read the license using input stream and convert it to string using the default charset. UTF8 chars (?) in the 
NetBeans license are not in the default charset but in UTF8 so the bad symbols are shown.

The issue (SystemUtils.resolveString("$R{" + licenseResouce + "}")) is going from 
nbi/engine/src/org/netbeans/installer/wizard/components/panels/LicensesPanel.java 
nbi/engine/src/org/netbeans/installer/product/components/ProductConfigurationLogic.java 

Additionally the same technique is been used in the following files and thus can happen
installer/components/products/nb-javame/src/org/netbeans/installer/products/nb/javame/ConfigurationLogic.java 
installer/components/products/nb-portalpack/src/org/netbeans/installer/products/nb/portalpack/ConfigurationLogic.java 
Comment 6 dlipin 2008-04-10 15:23:23 UTC
The issue with license in the IDE is also obvious: JEditorPane.setPage(url) method is used and when the document at url 
contains UTF8 chars they are not displayed correctly. 
Likely JEditorPane.setContentType will do the trick...

Also CC-ing Marek - it seems that he mentioned as the author of o.n.upgrader/src/org/netbeans/license/LicensePanel.java 
Comment 7 Antonin Nebuzelsky 2008-04-10 15:29:08 UTC
Dmitry, I suggest that we fix this issue in 6.1 without code changes. Simply by changing the content of LICENSE.txt
file, removing the UTF8 characters. BTW, the characters are some special double-quotes. We can use the regular
double-quotes instead.
Comment 8 dlipin 2008-04-10 15:32:59 UTC
Tonda,

I am all for that. Should we check with Darin/Legal that change?

FYI:
diff C:\license.txt C:\decoded.txt
20,21c20,21
< with Classpath Exception ("GPLv2 with Classpath Exception")
< or the Common Development and Distribution License ("CDDL").
---
> with Classpath Exception (тАЬGPLv2 with Classpath ExceptionтАЭ)
> or the Common Development and Distribution License (тАЬCDDLтАЭ).
766c766
< 48 C.F.R. ¤ 252.227-7014(a)(1)) and "commercial computer
---
> 48 C.F.R. ┬д 252.227-7014(a)(1)) and "commercial computer
Comment 9 mslama 2008-04-10 15:39:19 UTC
License text is supposed to be in ASCII (it is english text). If there is real need for special non ASCII characters it
must be clearly stated.
Comment 10 Antonin Nebuzelsky 2008-04-10 15:45:53 UTC
> Should we check with Darin/Legal that change?

Not needed.

Let's integrate it. Can you send me your decoded.txt file?
Comment 11 Antonin Nebuzelsky 2008-04-10 16:27:51 UTC
ide.branding/release/LICENSE.txt in release61 was updated (5ba690696a69).
Comment 13 Antonin Nebuzelsky 2008-04-11 11:53:20 UTC
*** Issue 132581 has been marked as a duplicate of this issue. ***
Comment 14 Antonin Nebuzelsky 2008-04-11 11:53:56 UTC
Can be marked FIXED I think.