I am writing a program to access the shapefile with attributes with Japanese characteristics, and I want to use setSubsetString(SQL inquiry).

When the SQL inquiry contains the Japanese characters, It does not work well. Such as " year=2004 AND 事故類型=その他" in this case, I do not know how to solve this problem.

  • you should force the string to be a unicode string, something like: query=ur" year=2004 AND 事故類型=その他" – eurojam Nov 21 '18 at 12:24
  • The original of the shaplefile is in SHIFT_JIS. So it does not work well. – Jia Yang Nov 21 '18 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.