Line 1523 is clearly wrong, I'll fix it. As for BOM, can you send an
example file? (Send it as .zip since gmail screws up text files.)
Also, any ideas on how to fix this for the general case?
- yuri
On 3/24/07, Julio C=E9sar Carrascal Urquijo (MCTS) <jca...@gm...> w=
rote:
> I'm using the markdown.py command to generate HTML from Markdown
> documentation and I've found that if a utf-8 file starts with a BOM a
> paragraph is generated containing only the BOM and it ignores the
> header that's on the first line.
>
> I've fixed it temporarily by adding the following code to lines 1527
> of markdown.py:
>
> BOM_UTF8 =3D unicode(codecs.BOM_UTF8, "utf-8")
> if text.startswith(BOM_UTF8):
> text =3D text.lstrip(BOM_UTF8)
>
> But this should be generalized for any codec. Also, I think line 1523 sho=
uld be:
>
> input_file =3D codecs.open(input, mode=3D"r", encoding=3Dencoding)
>
> instead of:
>
> input_file =3D codecs.open(input, mode=3D"r", encoding=3D"utf-8")
>
> I'm using markdown-1.6a.zip on Windows with Python 2.5.
>
> Thanks.
>
> --
> Julio C=E9sar Carrascal Urquijo
> Microsoft Certified Technology Specialist
> http://jcesar.3stecnoinformatica.com/
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share y=
our
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Python-markdown-discuss mailing list
> Pyt...@li...
> https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss
>
--=20
Yuri Takhteyev
UC Berkeley School of Information
http://www.freewisdom.org/
|