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 18651 - HTML encoding incorrectly handled
Summary: HTML encoding incorrectly handled
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 3.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks: 18607
  Show dependency tree
 
Reported: 2001-12-14 13:07 UTC by Keiichi Oono
Modified: 2009-05-18 10:45 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 Keiichi Oono 2001-12-14 13:07:24 UTC
Could "charset" be added as HTML file's  property?
The HTML files may be saved as different encoding from system default. If HTML
files are saved with UTF-8 encoding, the multi-byte characters can not be
displayed on Japanese default Solaris encoding (EUC-JP), and on Japanese Windows
encoding (Shift_JIS). I would like to request to add encoding property for each
HTML file (like JSP), and use that property value when opening HTML editor.
We always use "charset" parameter for specifying HTML encoding, so I think it is
the better to name "charset" instead of "encoding" as that property name.

It is very useful for users that they can set encoding values for their HTML,
because user sometimes need to create HTML files encoded no-system-default. And
that property value can be used to convert the encoding. Could you investigate
the possibility to add those kind of property as HTML file property?
Comment 1 Ken Frank 2002-03-12 18:17:51 UTC
marking as P2 since this would be very helpful to
those using localized product or users of
English product in other locales
ken.frank@sun.com
03/12/2002
Comment 2 Marek Grummich 2002-07-22 09:58:44 UTC
Set target milestone to TBDo
Comment 3 Ken Frank 2002-10-12 19:37:55 UTC
Changing to defect after consulation with nb QA and comments from nb
strategy that some i18n rfes could actually be viewed as defects. 
And since this one and others about encoding in jsp/web apps come from
those
at localization center, it seems that this could be viewed as valid
customer issues.
Let me know if more details are needed.
ken.frank@sun.com
Comment 4 _ rkubacki 2002-11-27 16:21:54 UTC
I haven't heard about such discussion. Sorry but this really qualifies
as a RFE.
Comment 5 Jesse Glick 2002-12-23 16:36:39 UTC
Consistent use of the I18N keyword.
Comment 6 Petr Jiricka 2003-12-05 09:40:33 UTC
I believe encoding in HTML files is now handled in another way - by
looking at the HTML header. Thus, no property is necessary. So this
issue is essentially fixed. Petr P., can you comment?
Comment 7 Petr Pisl 2003-12-05 10:13:44 UTC
Petr, you are right. There is code which looks for CONTENT-TYPE and
CHARSET in the head of the html file. This charset is used for loading
and saving. Unfortunately there is hard coded everything in uppercase
so it will not work, when you write the html file in lower-case letters.
Comment 8 Marek Fukala 2006-10-24 13:01:26 UTC
Changint to bug based on Petr's latest comment.
Comment 9 Marek Fukala 2007-02-16 14:16:02 UTC
fixed + lexerized.

Checking in ide/golden/deps.txt;
/cvs/ide/golden/deps.txt,v  <--  deps.txt
new revision: 1.458; previous revision: 1.457
done
Checking in html/nbproject/project.xml;
/cvs/html/nbproject/project.xml,v  <--  project.xml
new revision: 1.13; previous revision: 1.12
done
Checking in html/src/org/netbeans/modules/html/HtmlEditorSupport.java;
/cvs/html/src/org/netbeans/modules/html/HtmlEditorSupport.java,v  <-- 
HtmlEditorSupport.java
new revision: 1.16; previous revision: 1.15
done
Comment 10 Keiichi Oono 2007-12-13 09:25:17 UTC
I verified in 6.0. I confirmed HTML file encoding is set by value of "Content-Type" attribute.
Thank you for your fixing!