On 29/09/2008 04:21, hzluo wrote:
Friends,
I have taken complete examination and test for this problem,
found the following information:
1. Qt 4.4 has fixed several locale related problems, so now lyx
is able to handle any files with non-ASCII chars in filename.
That's good news!
This is true on Windows XP systems.
This seems to be true on Vista too. I only tested with latin characters
though (éùø).
I do not know the effect
on other systems. May someone test it on Linux?
2. Even with Qt 4.4, tex2lyx has problem handling non-ASCII
chars in filename. According to MS document, the system default
to set the locale as "C", which cannot handle non-ASCII chars
in filename. So the fix is quite simple: call setlocale with proper
locale string. According to MS document, the string ""
(i.e, a 0-length string) implies the system default ANSI codepage.
So, the following one line code will fix the problem:
setlocale(LC_ALL,"");
I have tested on Windows and it works. The attached patch
will add this call at proper position.
Looks like a sane solution.
Abdel.