Angus Leeming <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: | > Angus> In Python, you can write: unicode(string,'latex+latin1') | > Angus> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252124 | | > Angus> so I guess that we could define a similar converter and pop up | > Angus> an error box if a character cannot be converted. | | > Yes, if the number of characters we want to translated is small enough. | | I'd hope that we could either cut and paste a character array or, better, | use libiconv to do the work for us. | | #include <iconv.h> | | iconv_t iconv_open(const char *tocode, const char *fromcode); | | size_t iconv(iconv_t cd, | char **inbuf, size_t *inbytesleft, | char **outbuf, size_t *outbytesleft); | | int iconv_close(iconv_t cd); | | In other words, use ICU to create a UTF-8 version of the latex file and | then pass this through iconv to generate a latin-1 encoding.
That will work "just like that" in a lot of cases, but remmeber that our .lyx file does not really have a defined norm. But still, I think this problem is not really had to solve, might be some work, but not hard. -- Lgb