Joshua J. Kugler wrote: > Well, since I'm the only one posting recently, I hereby continue my attempts > at keeping this list from dying. :) > > In rendering my output, I've noticed that using output='xhtml-strict' renders > the entities and inserts high-ASCII characters in my document. Characters, > by the way, which Firefox on Linux renders as an accented 'A' plus the > intended character. It seems (via investigation with a hex editor) there are > actually two characters being inserted there. For instance, a becomes > C2 A0 (if my memory from last night holds).
By default, Kid creates utf-8 encoded output, which is C2 A0 in the case of an entity. So that is correct. If you set utf-8 encoding in Firefox, this should display correctly. If you have a head section in your kid template, then Kid should inject the following line automatically which should trigger Firefox to switch to utf-8: <meta content="text/html; charset=utf-8" http-equiv="content-type"> > So, that seems annoying, but I thought I'd try this instead: > > t.write(filename, output='xhtml-strict', format='named') > > Even with the format='named' parameter, which according to the docs "has the > named parameter set, so it will produce named HTML character entities in the > output for characters which are not contained in the output encoding (i.e. > instead of  )," it still renders the characters instead of > keeping the entities. The 'named' format causes numeric entities to be rendered as named entities instead. Since you don't have any numeric entities in the output, it does not make a difference. Kid only produces XML entities if the character cannot be rendered in the given encoding. This happens, for instance, if you output in ascii encoding instead of utf-8: t.serialize(output='xhtml-strict', format='named', encoding='ascii') Hope that cleared some things up for you. -- Christoph ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ kid-template-discuss mailing list kid-template-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kid-template-discuss