Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

> 
> >>>>> "José" == José Matos <[EMAIL PROTECTED]> writes:
> 
> José> On Tuesday 10 July 2007 11:47:36 Jean-Marc Lasgouttes wrote:
> >> It would be even better to provide explicit commands or some kind
> >> of script to update .lyx file. I suspect it is not trivial.
> >> 
> >> JMarc
> 
> José> Using iconv?
> 
> José> Something like this for bash
> 
> José> cd /path/to/layouts for l in * do cp $l tmp.txt iconv -f latin1
> José> -t utf8 tmp.txt -o $l done
> 
> You do not want to translate the whole file, only the 
> \begin_layout NameWithAccent
> lines. 

But lyx2lyx *does* convert, e.g. 
\begin_layout Liste_à_puces
as
\begin_layout Liste à puces
(sorry, my Solaris does not display Unicode).

lyx-1.5.0rc2 has an assertion if I open the file in the LyX window,
but exports perfectly this as itemize if I run the export as batch with
lyx-1.5.0rc2 -e latex unicode_test_1.5.lyx

So nothing has to be done on the lyx docs side.

About layout conversion: layout2layout.py updates the format, iconv 
turns them in utf8 (needed for non-ascii characters in the style bodies).

There are two ways to solve the assertion problem:
 - forbid non ascii characters in styles names and use gettext to translate:
needs manual renaming of style names with non-ascii characters
(bugfree with lyx up to 1.4) to ascii names and update of gmo files);
 - allow non ascii characters: Abdel's patch should solve the assertion problem.

Do you need an example ?

-- 
Jean-Pierre





Reply via email to