Georg Baum wrote:
On Friday 29 December 2006 14:33, Dov Feldstern wrote:

Thanks, the patch works in the sense that it doesn't complain now about
not finding the "default" encoding. And the display in the GUI is
actually okay (and there's no reason why it should be affected by the
encoding --- it depends only on the language, I think). However, the
latex file is still not fully generated, because of the problem with iconv.


Are we talking about the same file? Your file heb142-default.lyx works fine here (with the described display problems) since the patch is in. The patch was not meant to fix the iconv problem with the "auto" encoding.

I'm sorry for not being clear. You're right --- using the file heb142-default.lyx, there is a problem with the display, but the generated latex is correct. But the reason (for both of those things) is that the lyx file was originally created with 1.4.2 --- so it's not a unicode file at all! (And I guess this also implies a problem with conversion of files from 1.4.X to 1.5.0?) So on the one hand, 1.5 doesn't know how to display the characters anymore (I'm not sure exactly why, though); and on the other hand, it has no problem when generating the latex, because it doesn't have to encode it --- it's already encoded.

But this doesn't reflect the true situation in 1.5. There, an equivalent file (attached) has the Hebrew represented as unencoded unicode. So LyX now displays it correctly; however, when generating the latex file, it depends on the encoding option:
*) If encoding is set to cp1255, everything is okay;
*) If encoding is set to "auto", then generating the latex file gets stuck on the English paragraph in which a Hebrew word appears. This is because LyX is trying to encode the entire paragraph using a single encoding. So a Hebrew paragraph is encoded as cp1255, and everything is ok. But an English paragraph with Hebrew in it is encoded as latin1 or whatever, but suddenly runs into some characters which are Hebrew, and that's where iconv complains. If you look in lyx's temp dir, you can see the beginning of the file, up until the problematic paragraph. *) If the encoding is set to "default", then iconv complains already at the Hebrew paragraph, so something there is still wrong.

Sorry for not making myself clear before, hope this clarification helps.


But here's where the second problem arises, and this time it's LyX's
problem, not latex's (though I'm less sure about this part): it seems to
me like LyX itself --- not only latex --- is also determining the
encoding based on the paragraph, rather than based on the individual
characters' language.

Yes. It is implemented like that because of the limitation of older
inputenc packages.

There's no real reason why LyX should limit itself just because latex
does. Here exactly is an example where latex will manage, if only LyX
would.


I don't think that latex would manage, but I'll create a test patch so that we can try out.

The reason I say that latex will manage, is that the generated latex file should look exactly the same as the file generated by 1.4.2, which does work...



Georg


Thanks!
Dov

#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
\lyxformat 256
\begin_document
\begin_header
\textclass article
\language english
\inputencoding default
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize default
\spacing single
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "Dov Feldstern,217,658-4659," 
\end_header

\begin_body

\begin_layout Standard
this is english
\end_layout

\begin_layout Standard

\lang hebrew
וזה, לעומת זאת, בעברית.
\end_layout

\begin_layout Standard
english with 
\lang hebrew
עברית
\lang english
 works fine.
\end_layout

\begin_layout Standard

\lang hebrew
עברית עם 
\lang english
english
\lang hebrew
 גם עובד בסדר.
\end_layout

\end_body
\end_document

Reply via email to