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 233314

Summary: project prevents working with files in different encodings
Product: editor Reporter: w_barath
Component: -- Other --Assignee: Milutin Kristofic <mkristofic>
Status: RESOLVED DUPLICATE    
Severity: normal CC: pjiricka
Priority: P3 Keywords: I18N
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description w_barath 2013-07-24 12:31:33 UTC
I have a problem with netbeans' radically restrictive i18n support:

An older website I'm maintaining keeps all its files and its default server document encoding as Latin-1.  However I have upgraded this site to use some JSON files which I retrieve with jQuery.  As you should be aware, AJAX requests are always performed in UTF-8 encoding as are JSON encoded files.  

Therefore I cannot use Netbeans to work on this website, because Netbeans does not allow different file encodings per document, and editing a UTF-8 document in Latin-1 / ISO8859-1 will result in corruption.  (The lack of a structured JSON editor mode can be somewhat overcome by performing some regex search&replace operations at load and save time, in case you're curious how I edit properly formed JSON in NetBeans)



Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.8.0-25-generic running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = OpenJDK 64-Bit Server VM 23.7-b01
Comment 1 w_barath 2013-07-24 12:31:37 UTC
Created attachment 137692 [details]
IDE log
Comment 2 Petr Jiricka 2013-07-31 08:00:08 UTC
Reassinging to JSON.
Comment 3 Petr Hejl 2013-07-31 08:10:29 UTC
AFAIK not JSON related: "because Netbeans does not allow different file encodings per document".

Perhaps you can use "Encoding support" plugin.
Comment 4 Milutin Kristofic 2013-07-31 12:20:39 UTC

*** This bug has been marked as a duplicate of bug 190236 ***