Browse Source

* Output the encoding label (still fixed to "utf-8", others are not yet supported), Mantis #19827, #19172.

git-svn-id: trunk@18034 -
sergei 14 years ago
parent
commit
72dcf89350
1 changed files with 5 additions and 11 deletions
  1. 5 11
      packages/fcl-xml/src/xmlwrite.pp

+ 5 - 11
packages/fcl-xml/src/xmlwrite.pp

@@ -673,17 +673,11 @@ begin
   else
   else
     wrtStr('1.0');
     wrtStr('1.0');
   wrtChr('"');
   wrtChr('"');
-  
-// DISABLED - we are only able write in UTF-8 which does not require labeling
-// writing incorrect encoding will render xml unreadable...
-(*
-  if Length(TXMLDocument(node).Encoding) > 0 then
-  begin
-    wrtStr(' encoding="');
-    wrtStr(TXMLDocument(node).Encoding);
-    wrtChr('"');
-  end;
-*)
+
+  // Here we ignore doc.xmlEncoding and write a fixed utf-8 label,
+  // because it is the only output encoding currently supported.
+  wrtStr(' encoding="utf-8"');
+
   if TXMLDocument(node).xmlStandalone then
   if TXMLDocument(node).xmlStandalone then
     wrtStr(' standalone="yes"');
     wrtStr(' standalone="yes"');