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 - project prevents working with files in different encodings
Summary: project prevents working with files in different encodings
Status: RESOLVED DUPLICATE of bug 190236
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2013-07-24 12:31 UTC by w_barath
Modified: 2013-07-31 12:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (190.27 KB, text/plain)
2013-07-24 12:31 UTC, w_barath
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***