Bug#409779: xbel-utils: xbel_parse raises exception with some non ascii characters

arno. arno. at no-log.org
Mon Feb 5 12:35:23 CET 2007


Package: xbel-utils
Version: 0.8.4-6
Severity: normal

Hi,
I have converted a bookmarks file from Mozilla to xbel with
ns_parse bookmarks.html xbel.xml

when trying to convert it back with
xbel_parse --netscape < xbel.xml

I get the following trace :
  File "/usr/lib/python2.4/site-packages/_xmlplus/xbel/xbel_parse.py", line 110, in ?
    elif mode == '--netscape': bms.dump_netscape()
  File "/usr/share/pycentral/xbel-utils/site-packages/_xmlplus/xbel/bookmark.py", line 102, in dump_netscape
    folder.dump_netscape(out)
  File "/usr/share/pycentral/xbel-utils/site-packages/_xmlplus/xbel/bookmark.py", line 240, in dump_netscape
    child.dump_netscape(out)
  File "/usr/share/pycentral/xbel-utils/site-packages/_xmlplus/xbel/bookmark.py", line 231, in dump_netscape
    out.write("  <DT><H3%s%s%s>%s</H3>\n" %
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

I will join an example of bookmarks.html file that triggers the problem


arno.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-486
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)

Versions of packages xbel-utils depends on:
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-central                0.5.12     register and build utility for Pyt
ii  python-xml                    0.8.4-6    XML tools for Python
ii  xbel                          0.8.4-6    XML Bookmark Exchange Language

xbel-utils recommends no packages.

-- no debconf information
-------------- next part --------------
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
     It will be read and overwritten.
     DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1 LAST_MODIFIED="1170674876">Bookmarks</H1>

<DL><p>
    <DT><H3 LAST_MODIFIED="1165309686" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$2d3FQ1">Bookmarks Toolbar Folder</H3>
<DD>Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar
    <DL><p>
    </DL><p>
    <DT><H3 ADD_DATE="1087222772" LAST_MODIFIED="1170674893" ID="rdf:#$3Zrn92">doc linux</H3>
    <DL><p>
        <DT><H3 ADD_DATE="1118710106" LAST_MODIFIED="1118710135" ID="rdf:#$eiGaB2">g?n?raliste</H3>
        <DL><p>
            <DT><A HREF="http://www.linux-kheops.com/" ADD_DATE="1094008870" LAST_VISIT="1097713727" LAST_CHARSET="ISO-8859-1" ID="rdf:#$cdYkz3">Bienvenue sur Linux-Kheops</A>
            <DT><A HREF="http://lea-linux.org/" ADD_DATE="1087347194" LAST_VISIT="1124567993" LAST_MODIFIED="1098402776" ICON="data:image/x-icon;base64,AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAEAgIAK4SkABRCUgBIw+gAFBNoAExOqgAMhroAECIqABxidgDu4twAJCNLADqjxgClpKQABk5uAMPCwgAUY4MAFBU/ADQ0NAAZVmoAxMTtACMilwAMbpoAh4J9ABYUFACsrMEA1NPRAJuSjQAFJTUA9fT0AAyb2gAxMWsAd3JuAAUVIwAIRV0AtLS0AApUdgA5epIAZGXVAOTj/QAWF4UASUjOAAY0SAAcKi4AP7TZAFVSUgCkpOgAhIXSAISElABUVWYAZWJiAM3MzADc2tkAPjw8AGVmZgAMXoYA7+vpADQzmgAfHB0ARUREAJSSqgARk8gAdHPUAKSiqgCNi4oAXFpaAE1KSgBL0PoACSw7AAY+WAAHHCcAWVlxAAYOHAAmIyMAZGJ6AHx6dgDW1eoA/P7+AISE4gDJu7UAVlfTACIkZwBMS10Ad3V8AAc7TwAOo+IAGhUbALSy6QBALDUADQwMABgWVQA+NDMAo5qVACAfgAA0lbQAVFKwABRcdwBkZOUAJ7PrAHRWTwAsHSMAMyQrAH18fADl5OQAwaykALSyvgDfzMUA7tzXAG1sbACUlOAAQsX1AMTGxgAMdaUA1dbWACsqgAAJS2gAybStAAyU0AAMZpAALCukAISEhAD09PsALiwsAFVWVgCSa2AANDOzACmLrwAkJGIAlZSUAJSU1ABkZL4AREKGAHR2tgB0c+sANDZ+AFRSjADU1fwAODh4AERCxQCkpNYAtLLSAGRkigCEhvEAXFq+AJSU8gBISHQAIC5FAAweNgANfKsAzM7mADw+qgB8esYAvLrmABwbUAA8OrkAnZycACycxAA8qssAHKznAD0+RAAMjcQA7O7uAE1P0QCMjo4A3t7eAC+77gC7vLwAWlngAGxqzgCsq+wATEyLAFxcjAAkbIIADIK0AEG74ABdXl4ADWuUAFxcsABsbeYALCxWAHx97QCsrKwAIyF4ACwqkgAWF3YALi16AFxcggBvbX0AEpvVAIyM3ACcntIA3N39AExOwgBsbJAANiY1ADw8YACcm+AAnJvzAHV0dAAsKlIANDRFAK+MgwB0do4AHyCRALS19gDMy/oAvL34AAxcgAB8fogAf1tSAKJ8cgCcbmYAHB5KAFTW/gDBpJwAJEJaAItkWQBMyu4AJCafAFxe1gBMTnQAKKTUAE1OTgBGyvcANEpSABAUMAA0rdUA7O38ADQyggAoJnoA28W+AKWDeADl1M8AnHNnACxKYgDSvroAHBZKABsajABPS2cAFBZgAE5P1wCMjp4AHBptAIyKzgBcXnIAPD6CAIyK6gBcXuEAxMT6AKSl9gAsLawAfH7WABwbXQA8PsEAbG7aAKyt8wD///8A/////////////xlM/////0xMTExMTExMTM4VFUNMTP9MTEwD1EE3AHmfdJ9vr0z/TEzU3lQA6DdMQx0dBqxM/0x91J0dQWpMTHAdHQajTExMom1UHWI3TEwcAAAAAExMTEwqI6U1akxMMgBYAABMTExMTExMVRdMTFgAAAA1TExMTExMTFdVTExnABccTExMTExMTExMOWM3AJOTALRMTExMTExMTEw1IxUdrx8ATExMTExMTExMYwhTAN1MVQxMTExMTExMTGQATBcATHMnf0xMTExMTExMVUpMNABY5CdMTExMTExMTDNXYwCz/ExMTExMTExMTExMTL+m5UxMTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" LAST_CHARSET="ISO-8859-1" ID="rdf:#$cZrn92">L?a, site d&#39;aide Linux francophone</A>
        </DL><p>
        <DT><A HREF="http://wiki.ubuntu-fr.org/installation/son" ADD_DATE="1123119932" LAST_VISIT="1139995636" ICON="data:" LAST_CHARSET="UTF-8" ID="rdf:#$1kzHk3">installation:son [Ubuntu-fr]</A>
    </DL><p>
    <DT><H3 ADD_DATE="1090537513" LAST_MODIFIED="1170674899" ID="rdf:#$fZrn92">Programmation</H3>
    <DL><p>
        <DT><A HREF="http://www.zvon.org/xxl/XPathTutorial/General/examples.html" ADD_DATE="1148851386" LAST_VISIT="1170437440" LAST_CHARSET="UTF-8" ID="rdf:#$uPS4G">XPath ??</A>
        <DT><A HREF="http://www.faqts.com/knowledge_base/index.phtml/fid/1762" ADD_DATE="1148851407" LAST_MODIFIED="1148851419" LAST_CHARSET="UTF-8" ID="rdf:#$FPS4G">FAQTs - E4X</A>
        <DT><A HREF="http://www.toutimages.com/codes_caracteres.htm" ADD_DATE="1094580794" LAST_VISIT="1148851500" LAST_CHARSET="windows-1252" ID="rdf:#$LwYpP3">Symboles,table de codes caract?res: ASCII,ISO,HTML.</A>
        <DT><A HREF="http://en.wikipedia.org/wiki/Comparison_of_layout_engines" ADD_DATE="1148851335" LAST_VISIT="1169679311" ICON="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAEAgQAhIOEAMjHyABIR0gA6ejpAGlqaQCpqKkAKCgoAPz9/AAZGBkAmJiYANjZ2ABXWFcAent6ALm6uQA8OjwAiIiIiIiIiIiIiI4oiL6IiIiIgzuIV4iIiIhndo53KIiIiB/WvXoYiIiIfEZfWBSIiIEGi/foqoiIgzuL84i9iIjpGIoMiEHoiMkos3FojmiLlUipYliEWIF+iDe0GoRa7D6GPbjcu1yIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" LAST_CHARSET="UTF-8" ID="rdf:#$ZOS4G">Comparison of layout engines - Wikipedia, the free encyclopedia</A>
    </DL><p>
</DL><p>


More information about the pkg-zope-developers mailing list