Feature request #2315
QGIS exceptions does not support unicode
|Category:||Translations and international|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Easy fix?:||No||Copied to github as #:||12375|
Current exception handling in QGIS can not display correctly non-ascii error messages. Still there is a code, that migh emit exception with unicode text as it's content. Currently such text is displayed as ascii string (non-ascii chars are grabbled). Such issue could be solved, if exception text would be stored as a QString, still as I have no skills in C++ and Qt, I can't provide patches :(
#1 Updated by Jürgen Fischer over 9 years ago
The exception can handle non-ascii messages.
I've already had a pending patch - which also contains string changes, we can't currently commit. Although I wasn't able to get a garbled error message as my proj doesn't emit localized messages. I just see the latvian error message with an English error text from proj.
#2 Updated by marisn - over 9 years ago
Changing bug description back to original, as proj.4 currently does not support localized error messages. This is (almost) pure QGIS issue.
Compiled current QGIS trunk (b2e7a7c1 (SVN r12613)) without any CMAKE_BUILD_TYPE setting with Qt 4.6.0. QGIS displays pop-up with text and after clicking OK, it's impossible to close QGIS window (only with xkill):
NeveiksmÄ«gs forward transformÄÅ¡ana no (10075.3, 112109) ar kÄ¼Å«du: latitude or longitude exceeded limits
String should read (still it's grammatically incorrect due to how this string is represented to translators and hardcoded "forward" word):
Neveiksmīgs forward transformēšana ...
IMHO problem lies here: http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsexception.h#L54
Conversion between QString and std::string is done via fromAscii() (if I understood QString manual correctly).