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 191379 - XHTML file not loaded w/ the encoding specified in the XML PI
Summary: XHTML file not loaded w/ the encoding specified in the XML PI
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 20:51 UTC by lkmatsumura
Modified: 2014-07-25 02:37 UTC (History)
3 users (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 lkmatsumura 2010-10-26 20:51:25 UTC
NetBeans 7.0 M2 PHP


I have files with extension .xhtml using windows-1252 encoding.
The project is configured to use windows-1252 but when I open and edit
my .xhtml files Netbeans 7.0 is saving these files as UTF-8.
With netbeans 6.9.x and earlier the files are saved with windows-1252
as configured in the project.
Comment 1 David Strupl 2010-11-03 14:41:30 UTC
PHP owners can you please evaluate this one? Thanks.
Comment 2 Filip Zamboj 2010-11-03 16:08:18 UTC
Product Version: NetBeans IDE Dev (Build 101103-444e03aea134)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01-279

I saved .xhtml file using development build project set to windows-1252. file was properly saved and encoding is set correctly as well.  

$ file -I newxhtml.xhtml 
newxhtml.xhtml: application/xml; charset=iso-8859-1

I created .html file as well and it surprises me that with different result 

$ file -I newhtml.html 
newhtml.html: text/html; charset=unknown-8bit
Comment 3 Petr Pisl 2010-11-04 14:44:39 UTC
It's problem of the html and xhtml file.
Comment 4 Marek Fukala 2010-11-05 13:23:44 UTC
Works fine for me on MacOSX and web project. Can someone verify if the issue is not the same with other file types? I mean whether this can be an issue of the bad PHP Project's FEQ?
Comment 5 Filip Zamboj 2010-11-05 13:43:20 UTC
(In reply to comment #4)
> Works fine for me on MacOSX and web project. Can someone verify if the issue is
> not the same with other file types? I mean whether this can be an issue of the
> bad PHP Project's FEQ?

will a look
Comment 6 lkmatsumura 2010-11-25 12:30:53 UTC
Hi,

I realized something that had not yet reported.
I use smarty template, and the files that I editing not have the header

<?xml version="1.0" encoding="windows-1252"?>

since they will appended to the main template.

Files that have the header works fine, but files that not have, even that was originaly created with diferent format (ANSI in this case) are saved as UTF-8.

Tested with NB 7.0 Beta.

Thanks in advance.
Comment 7 kovalski 2011-04-27 07:01:20 UTC
Same bug appeared when I was editing Smarty templates with default encoding ISO-8859-2 - they were saved with encoding UTF-8.
Comment 8 Tomas Mysik 2011-06-03 10:20:32 UTC
Batch reassigning.
Comment 9 Tomas Mysik 2011-06-15 09:29:35 UTC
(In reply to comment #4)
> Works fine for me on MacOSX and web project. Can someone verify if the issue is
> not the same with other file types? I mean whether this can be an issue of the
> bad PHP Project's FEQ?

Just verified that the FEQ in PHP is OK (de facto copy & pasted from java.api.common module). So reassigning, thanks.
Comment 10 Marek Fukala 2011-10-31 15:26:37 UTC
The "only" problem I found is that the xhtml files ignores the declared encoding in the XML PI: <?xml version="1.0" encoding="ISO-8859-1"?>. So the files are always loaded/saved using the project's encoding in spite of html files where the <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> tag is taken into account.
Comment 11 Marek Fukala 2014-07-23 10:08:21 UTC
changeset:   276001:bb015d85ce11
summary:     #191379 - XHTML file not loaded w/ the encoding specified in the XML PI
Comment 12 Quality Engineering 2014-07-25 02:37:43 UTC
Integrated into 'main-silver', will be available in build *201407250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bb015d85ce11
User: Marek Fukala <mfukala@netbeans.org>
Log: #191379 - XHTML file not loaded w/ the encoding specified in the XML PI