Summary: | UTF8 doesn't work correctly | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Michel Grentzinger <mic.grentz> |
Component: | part | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | ||
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Michel Grentzinger
2009-08-03 15:35:40 UTC
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 |