Skip to content
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

Added support for Unicode translations in fTools visual #2520

Merged
merged 1 commit into from Nov 30, 2015

Conversation

nicanor-b
Copy link

A student of mine who uses the Simplified Chinese translation for QGIS receives the following error message and an incomplete list of results when running the Basic Statistics plugin:

IndexError: list index out of range
Traceback (most recent call last):
File "/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools/doVisual.py", line 186, in runFinishedFromThread
item = QTableWidgetItem(tmp[1])
IndexError: list index out of range

I noticed that when Unicode characters for the Simplified Chinese translation are included in a result string, the ":" character used to split the string is encoded as "\uff1a". This patch adds support for splitting the result string when the colon is encoded with its Unicode value.

m-kuhn added a commit that referenced this pull request Nov 30, 2015
Added support for Unicode translations in fTools visual
@m-kuhn m-kuhn merged commit 1c2454f into qgis:master Nov 30, 2015
@m-kuhn
Copy link
Member

m-kuhn commented Nov 30, 2015

Thank you.
Not sure if this is the best solution but there's probably not much harm it can do.

Do you know if anything ported from ftools to processing could be affected as well?

@nicanor-b
Copy link
Author

Agreed -- it's not a clean solution, but it worked as a quick fix for my class.

Similar issues did not appear when using tools ported to Processing, but will update if I notice anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants