|
From: Firat O. <ozg...@gm...> - 2009-10-19 10:10:44
|
2009/10/19 <gr...@us...>
> hello,
>
> any comments to this behaviour
>
> * why 'ASCII' sometimes works and sometimes not ?
> * why 'ASCII' is in uppercase, python/encodings has all lowercase ?
>
> cheers
> --
>
> ---------- Forwarded message ----------
> Date: Mon, 12 Oct 2009 19:05:30 +0300
> From: Firat Ozgul <ozg...@gm...>
> To: gr...@us...
> Subject: Re: [Docutils-develop] Uppercase "ASCII" in nodes.py
>
> Hello,
>
> No, those codes do not produce any errors on Python 2.6.3 that I have...
>
> I have Docutils 0.6 compiled from source on Ubuntu Karmic Koala. And when I
> try to "make html" in Sphinx, I get the error I mentioned in my previous
> e-mail, unless I manually edit nodes.py to change uppercase "ASCII" to
> lowercase "ASCII".
>
> Thanks for the interest.
>
> Firat Ozgul
>
> 2009/10/12 <gr...@us...>
>
> > On Mon, 12 Oct 2009, Firat Ozgul wrote:
> >
> > Hello,
> >>
> >> In Docutils 0.6, specifically in nodes.py, more specifically in the
> >> make_id() function, the following line will cause an error:
> >>
> >> id = unicodedata.normalize('NFKD', id).encode('ASCII',
> >> 'ignore').decode('ASCII')
> >>
> >> The encoding "ASCII" should be written in lowercase. So the line should
> >> read:
> >>
> >> id = unicodedata.normalize('NFKD', id).encode('ascii',
> >> 'ignore').decode('ascii')
> >>
> >> Otherwise the programs that use this function will produce this error:
> >>
> >> File "/usr/local/lib/python2.6/dist-packages/docutils/nodes.py", line
> >> 1845, in make_id
> >> encode('ASCII', 'ignore').decode('ASCII')
> >> LookupError: unknown encoding: ASCII
> >>
> >
> > does this ::
> >
> > import unicodedata
> >
> > id = u"abc def"
> >
> > id = unicodedata.normalize('NFKD', id).encode('ASCII',
> > 'ignore').decode('ASCII')
> > id = unicodedata.normalize('NFKD', id).encode('ascii',
> > 'ignore').decode('ascii')
> >
> > produce an error at your place ?
> >
> > python2.6 on what platform ?
> >
> > cheers
> >
> > --
> >
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Docutils-develop mailing list
> Doc...@li...
> https://lists.sourceforge.net/lists/listinfo/docutils-develop
>
> Please use "Reply All" to reply to the list.
>
Hello,
I have a desktop and a laptop computer, both of which run Ubuntu Karmic
Koala. The Python version they have now is 2.6.4rc1.
In my laptop computer "ASCII" causes a crash in Sphinx. And until I manually
edit nodes.py Sphinx goes on to spit errors... However, in the desktop
computer Sphinx works fine no matter in what case is "ASCII"... Just a
note, uninstalling and re-installing Sphinx and Docutils did not have any
effect on the problem...
Regards,
Firat
|