Version: (using KDE 4.2.4) Compiler: gcc OS: Linux Installed from: Debian testing/unstable Packages Hello, On my french system, I choose UTF-8 as codepage for my file in Kdevelop (Qt Apps). But if the caracters (like é, à, É, ê) are correct when I type them in the editor they are not correcly printed in my windows... When I re-open the source file, they are badly printed. Thanks,
Kate does all the encoding-changes, hence re-assigning.
I've resolved the encoding problem. All my editors is UTF8 ready now. But the problem is still present at the compilation process. I've found this line on tab "Messages" when I compile my application. cd '/home/michel/Programmes/Qt/chronoport/chrono6G' && LC_MESSAGES="C" LC_CTYPE="C" make -k I think the problem is here !
What exactly do you mean with "problem is still present in compilation process"? We're explicitly running make with C locale so that we get english messages from the compiler as those are the only ones that we can properly parse. If this influences the string in your application then you're code is wrong. Instead of something like: label->setText( "MyTextWithé" ) you need to use label->setText( QString::fromUtf8("MyTextWithé") ) if the file is properly encoded in UTF8.
(In reply to comment #3) > What exactly do you mean with "problem is still present in compilation > process"? We're explicitly running make with C locale so that we get english > messages from the compiler as those are the only ones that we can properly > parse. If this influences the string in your application then you're code is > wrong. Instead of something like: > > label->setText( "MyTextWithé" ) > > you need to use > > label->setText( QString::fromUtf8("MyTextWithé") ) > > if the file is properly encoded in UTF8. That's right with fromUtf8() ! Thanks ! The user should be able to choose its locate. Is it possible in Kdevelop?
(In reply to comment #4) > The user should be able to choose its locate. Is it possible in Kdevelop? No idea what you mean with that. Of course you can use whatever locale you want to run kdevelop in. However as I said the make-process will _always_ use C locale so we can analyze the output and instead of the overly verbose stuff like gcc -Wall -L -l ......... just show simple things like Compiling foo.o