Bug 61500

Summary: quickstart sets wrong charset
Product: quanta Reporter: Kai Lahmann <kfl>
Component: generalAssignee: András Manţia <amantia>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Kai Lahmann 2003-07-21 18:53:33 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:          Linux

if I use another charset for a specifiy project than for single pages (for example utf-8) quickstart still gives me this:

  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">

...which is totally wrong there!

1. it is the wrong charset for the page loaded
2. this information is totally useless at all, as the Browser needs to know the charset to read the charset
3. I'm not even sure, if it's not hardcoded.

in short: just remove that line.
Comment 1 András Manţia 2003-07-21 23:12:00 UTC
Subject: QUANTA_3_1_BRANCH: quanta

CVS commit by amantia: 

Don't insert the meta line with charset in the document when using QuickStart. This is a quick-fix, as in the CVS version we will have a new QuickStart generator.

CCMAIL: 61500-done@bugs.kde.org


  M +2 -0      ChangeLog   1.90.2.87
  M +1 -3      quanta/quantaview_slots.cpp   1.66.2.9


--- quanta/quanta/quantaview_slots.cpp  #1.66.2.8:1.66.2.9
@@ -250,5 +250,4 @@ void QuantaView::slotTagQuickStart(){
   if ( quickDlg->exec() )
    {
-    const QString chset = QTextCodec::codecForLocale()->mimeName();
 
     DTDStruct *dtd = write()->defaultDTD();
@@ -258,6 +257,5 @@ void QuantaView::slotTagQuickStart(){
                         tag += quickDlg->lineTitle->text();
     tag += QuantaCommon::tagCase("</title>\n")+space+
-           "  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + chset + "\">\n"+
-           space+"  <meta name=\"GENERATOR\" content=\"Quanta Plus\">\n"+space+
+           "  <meta name=\"GENERATOR\" content=\"Quanta Plus\">\n"+space+
            QuantaCommon::tagCase("</head>\n")+space+QuantaCommon::tagCase("<body");
     if ( !QString(quickDlg->lineBGImage->text()).isEmpty())

--- quanta/ChangeLog  #1.90.2.86:1.90.2.87
@@ -4,4 +4,6 @@
   - bugfixes:
     - resolve symlinks before opening a file [#60860]
+    - don't insert the "<meta http-equiv="Content-Type" content="text/html; charset=..."
+      line when using the Quick Start dialog [#61500]
     - fix message window handling
     - fix script action error output handling


Comment 2 peterhudec 2003-12-23 14:32:13 UTC
"2. this information is totally useless at all, as the Browser needs to know the charset to read the charset"

Well, you can't say that. It is not totally useless, as it was designed for the *server*.
The server must be able to read the line and use it for a header field in the response.
The line itself only contains of US-ASCII (7bit) characters, so he will always find it out.
Some servers are configured to always put a specific header charset field, without looking at this meta tag. But if the server does not, it will break W3C rules and the document will fail the validation test for example.
So this line is a help for the server, not for the browser (of course, as you wrote! The browser must know the charset before he can read the line where it is described).