On Tuesday 09 January 2007 6:46 pm, Georg Baum wrote:
> José or any other python expert, I need your help. The attached patch is
> the lyx2lyx part of the "getting rid of InsetLaTeXAccent" patch.
> convert_accent works well, but revert_accent does not. I put the error
> messages in the file. Can anybody tell me why
>
> document.body[i] = unicodedata.normalize("NFKD", document.body[i])

  By default the file stream returns a string when reading a file. This will 
change in python 3.0 where all strings will be unicode.

  A shortcut now is to transform every line when reading to unicode in line 
194 of LyX.py

    line = unicode(trim_eol(line))

  This is just a guess but it should be enough for this.

> does not work?
>
> If you want to try this, use the attached test file (don't save it with LyX
> if you want to test convert_accent, it is hand crafted).
>
> Georg

-- 
José Abílio

Reply via email to