Re: encoding for comments
Michael Davidson <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 18 May 2004, gabor ([email protected]) wrote: > if config.has_key('blog_encoding'): > encoding = config['blog_encoding'] > else: > encoding = 'iso-8859-1' > cfile.write('<?xml version="1.0" encoding="'+encoding+'"?>\n') This won't work as written. You can't just put the encoding in the xml file; you have to write to the file using the given encoding. You should try using the string.encode method to do this. Michael ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click