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. On solaris I get a lot of EILSEQ errors, too. 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 Notice how values greater than 0x7f get the most significant bit replicated (0xc5 and 0xd8 here). I see the same on cygwin, but there I get instant crashes when I don't use -funsigned-char in CPPFLAGS. Moreover, after the switch to wchar_t, in order to avoid crashes, I have to patch Qt as described here: http://www.mail-archive.com/[email protected]/msg102556.html I traced down the problem to the fact that the EILSEQ errors i see on solaris, translate on cygwin to the fact that the Qt function static void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint src, uint const_alpha) in src/gui/painting/qdrawhelper_x86.cpp is called with the dest parameter pointing to invalid memory. The comp_func_solid_Source function is called in the same file as follows: void qt_blend_color_argb_sse(int count, const QSpan *spans, void *userData) { QSpanData *data = reinterpret_cast<QSpanData *>(userData); CompositionFunctionSolid func = qt_functionForModeSolid_SSE[data->rasterBuffer->compositionMode]; ... ... if (!func) return; while (count--) { uint *target = ((uint *)data->rasterBuffer->scanLine(spans->y)) + spans->x; func(target, spans->len, data->solid.color, spans->coverage); ++spans; } } But then I am lost here in the Qt internals... In conclusion, there's still something fishy about iconv conversions. -- Enrico
