[fpc-devel] fpdoc and unicode characters

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Aug 14 14:12:33 CEST 2008

On Thu, Aug 14, 2008 at 1:51 PM, "Vinzent Höfler"
<JeLlyFish.software at gmx.net> wrote:
>> But what is fpdoc's xml files?  Pure XML, XHTML or some custom/hybrid
>> format? The layout of fpdoc's files seem XML, but the documentation
>> content seems some hybrid HTML - hence the confusion with what is
>> allowed!
> Well, what's the DTD saying about it? ;)


>> Also something I think has been resolved in recent versions, but in
>> older 'makeskel' versions, it did not include the encoding in the
>> generated .xml file.  So what are we supposed to treat such files
>> encoding as? Default to W3C standards and use assume UTF-8?
> Errmm, yes?

Then we have a problem.

>> LCL and
>> fpGUI's fpdoc documentation (mostly) has no encoding specified in the
>> .xml files.  FPC's documentation specifies ISO8859-1 as the encoding
>> type, though I found one file (dateutils.xml) it FPC docs that hasn't
>> got an encoding (but my doc update is out of date).
> Well, as long as the contents is English, it doesn't matter to much, UTF-8 is fully compatible to 7-bit ASCII. ;)
> If you're unsure about the encoding, stick to the &#x0000; unicode entities, that way you can encode anything in 7-bit plain, portable ASCII.

I just tried that and it failed miserably!

Steps to reproduce:
 1. Make sure the fpdoc's .xml file specifies encoding of UTF-8.
     [By the way I think this encoding gets ignored totally.]
 2. Type Unicode characters in any format. Actual or escaped.
 3. Generate HTML documentation with fpdoc

  1.  The generated HTML always specifies encoding ISO8859-1! So why bother
       specifying the encoding in the .xml file??? Is the encoding in
the xml file
       actually used anywhere?
  2.  Actual and escaped Unicode characters end up being '??' garbage
       characters in the generated HTML.

 - Graeme -

fpGUI - a cross-platform Free Pascal GUI toolkit

More information about the fpc-devel mailing list