Enrico Forestieri wrote:

> On Tue, Nov 28, 2006 at 09:21:01AM +0100, Georg Baum wrote:
>> Michael Gerz wrote:
>> 
>> > I don't know what cause the problem - the colon, the backslash, the
>> > space, or the German Umlaut. Do you have any idea?
>> 
>> Yes. Non-ascii filenames do not work at all. See the thread "unicode and
>> filenames" for details.
> 
> I don't think this is the problem here.

Why? I am pretty sure, since Michael found out that it had nothing to do
with the file contents but with the name, and since the current filename
handling ignores encoding in some places while it treats everything as utf8
in others, it can very well end up in passing some invalid stuff to iconv.

> On solaris I get a lot of EILSEQ 
> errors, too.

These can have a totally different reason.

> I tried compiling both with -funsigned-char and without 
> it, but, even if this makes a difference (see below), I still get the
> errors.
> 
> For example, loading the following document (locally named bug2900.lyx)
> http://bugzilla.lyx.org/attachment.cgi?id=1296&action=view
> on solaris I get:
> 
> a) without -funsigned-char:
> 
> Error returned from iconv
> EILSEQ An invalid multibyte sequence has been encountered in the input.
> When converting from UTF-8 to UCS-4BE.
> Input: 0x5c 0x64 0x65 0x66 0x5c 0x41 0x41 0x7b 0x5c 0x41 0x41 0x7d 0x7b
> 0xffffffc5 0x7d Error returned from iconv
> EILSEQ An invalid multibyte sequence has been encountered in the input.
> When converting from UTF-8 to UCS-4BE.
> Input: 0x5c 0x64 0x65 0x66 0x5c 0x4f 0x7b 0x5c 0x4f 0x7d 0x7b 0xffffffd8
> 0x7d
> 
> b) with -funsigned-char:
> 
> Error returned from iconv
> EILSEQ An invalid multibyte sequence has been encountered in the input.
> When converting from UTF-8 to UCS-4BE.
> Input: 0x5c 0x64 0x65 0x66 0x5c 0x41 0x41 0x7b 0x5c 0x41 0x41 0x7d 0x7b
> 0xc5 0x7d Error returned from iconv
> EILSEQ An invalid multibyte sequence has been encountered in the input.
> When converting from UTF-8 to UCS-4BE.
> Input: 0x5c 0x64 0x65 0x66 0x5c 0x4f 0x7b 0x5c 0x4f 0x7d 0x7b 0xd8 0x7d

That document works fine here. You should not use -funsigned-char or
-fsigned-char unless you compile _all_ libraries that LyX uses (including
libc) with the same setting. Otherwise expect problems.

> In conclusion, there's still something fishy about iconv conversions.

Not in general (apart from filenames), only in your installations. If you
want to debug this properly set a breakpoint where it prints the "Error
returned from iconv" and examine via the backtrace where that data came
from. And of course compile with the default signedness of wchar_t.


Georg

Reply via email to