Feature request #2315
QGIS exceptions does not support unicode
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Jürgen Fischer | ||
Category: | Translations and international | ||
Pull Request or Patch supplied: | Resolution: | fixed | |
Easy fix?: | No | Copied to github as #: | 12375 |
Description
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 :(
Example: https://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgscoordinatetransform.cpp?rev=12550#L473
Associated revisions
fix #2315
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12640 c8812cc2-4d05-0410-92ff-de0c093fc19c
fix #2315
git-svn-id: http://svn.osgeo.org/qgis/trunk@12640 c8812cc2-4d05-0410-92ff-de0c093fc19c
History
#1 Updated by Jürgen Fischer almost 15 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 - almost 15 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).
#3 Updated by Jürgen Fischer almost 15 years ago
#4 Updated by Jürgen Fischer almost 15 years ago
- Resolution set to fixed
- Status changed from Open to Closed
applied in a13c99d1 (SVN r12641).