-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Garbled Japanese characters in GRASS plugin #14461
Comments
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Paolo Cavallini (@pcav) So, this turned out a practically unsolvable problem in GRASS. Quoting Glynn Clements: ===
Regarding #1: GRASS neither knows nor cares whether a string is in Suggestions as to how to determine whether a string uses the ANSI or Regarding #2: On Windows, any byte within the range 0-127 is assumed The most obvious example is that any occurrence of the byte 0x5C Neither EUC-JP nor UTF-8 have this problem (as these only re-purpose And I can't think of any solution which doesn't involve re-writing all Similar issues may exist with the other punctuation characters which While such cases are probably less common than the pathname issue, a -- Glynn Clements glynn@gclements.plus.comSo the solution seems just to switch to EN, just for Windows. |
Author Name: Minoru Akagi (@minorua) In Japanese Windows environment, GRASS commands output xml text of interface description that begins with the following line. @➇?xml version="1.0" encoding="CP932"?➉@ QDomDocument has ability to detect encoding, but it doesn't recognize most of codepage name "CPxxx". See http://qt-project.org/doc/qt-4.8/QTextCodec.html I think it's not better to rely the current encoding conversion ability of QDomDocument. Since GRASS commands usually output text in system default encoding, we maybe should treat encoding name that Qt doesn't recognize as system encoding.
|
Author Name: Paolo Cavallini (@pcav)
|
Author Name: Marco Hugentobler (@mhugent)
|
Author Name: Minoru Akagi (@minorua) Okay, I attach a patch including patch for #13224 anew.
|
Author Name: Giuseppe Sucameli (@brushtyler) Hi Minoru, I'm adding a check so if we are not able to get the encoding from the XML declaration (using utf8 and the regular expression) then we'll let Qt detects the encoding of the XML (current behaviour). This will make it working even whether the encoding name is not found, e.g. the encoding attribute is missing (though we are quite sure GRASS won't remove it) or the XML content is a UTF-16 or UTF-32 encoded string (the regexp doesn't match the text). Since I cannot test it with Japanese lang, please, could you try the branch "grass_jp_enc":https://github.com/brushtyler/Quantum-GIS/tree/grass_jp_enc from my repo and report if it works? |
Author Name: Minoru Akagi (@minorua) Giuseppe Sucameli wrote:
I've just tested your branch and got good result. Thanks! |
Author Name: Giuseppe Sucameli (@brushtyler) Fixed in changeset "c53c85813f4723b75d4e9326d2565fb51eaa8355".
|
Author Name: Giuseppe Sucameli (@brushtyler) Thanks Minoru Akagi! Now that the change is in master, please could other people test it and report here?
|
Author Name: Masaru Narazaki Narazaki (Masaru Narazaki Narazaki)
Original Redmine Issue: 4547
Affected QGIS version: master
Redmine category:grass
Assignee: Giuseppe Sucameli
In Japan if we try to use GRASS plugin with Japanese, we can not find correct japanese leter because of the Garbring as adding files.
They say this phenomina begun at version 1.0 of QGIS.
Please collect this phenomina.
The text was updated successfully, but these errors were encountered: