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 71731

Summary: I18N: can not find charset in HTML files, characters are garbled
Product: web Reporter: Masaki Katakai <masaki>
Component: HTML EditorAssignee: Tomasz Slota <tslota>
Status: VERIFIED FIXED    
Severity: blocker CC: jf4jbug, kfrank, mgrummich
Priority: P2 Keywords: I18N, RELNOTE
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: snapshot
this HTML file can be loaded properly into NB
this HTML file is generated from Mozilla, but can NOT be loaded properly into NB, multibyte chars are garbled

Description Masaki Katakai 2006-01-23 03:58:29 UTC
It seems that HTML files with following meta tag can not be loaded properly
into NetBeans.

  <meta content="text/html; charset=UTF-8" http-equiv="content-type">

Multibyte characters become garbled.

This meta tag is generated from Mozilla Composer.

1. On Mozilla Composer, Create HTML, save as UTF-8
   meta tag is included like above in Mozilla Composer case

2. Open NetBeans IDE
3. Open file then try to open the HTML file
4. UTF-8 characters are all garbled.

Usually we create HTML files on NetBeans, it generates HTML like below meta tag,

  <meta http-equiv="content-type" content="text/html; charset=UTF-8">

It seems that NetBeans can not understand when charset=UTF-8 is set
before content-type.

OK:  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
garbled:  <meta content="text/html; charset=UTF-8" http-equiv="content-type">


This would be problem when users try to import existing HTML files. I think
this is one of the reason of

http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=62950
Comment 1 Masaki Katakai 2006-01-23 03:59:01 UTC
Created attachment 28526 [details]
snapshot
Comment 2 Masaki Katakai 2006-01-23 04:00:00 UTC
Created attachment 28527 [details]
this HTML file can be loaded properly into NB
Comment 3 Masaki Katakai 2006-01-23 04:01:12 UTC
Created attachment 28528 [details]
this HTML file is generated from Mozilla, but can NOT be loaded properly into NB, multibyte chars are garbled
Comment 4 Petr Blaha 2006-01-23 11:42:45 UTC
I think the issue isn't showstopper for NB 5.0. Therefore, suggest to waive it
and add a comment in Release notes. 
mgrummich, do you agree?
Comment 5 Marek Fukala 2006-03-08 08:28:45 UTC
Tome, can you please take a look at this one?
Comment 6 Tomasz Slota 2006-03-08 16:03:38 UTC
Fixed in the 'release55' branch


/cvs/html/src/org/netbeans/modules/html/HtmlEditorSupport.java,v  <-- 
HtmlEditorSupport.java
new revision: 1.12.22.1; previous revision: 1.12
Comment 7 Pavel Rehak 2006-08-23 13:36:32 UTC
Verified in 5.5