Right now, I start using Interlis in QGIS (I never used Interlis before...). However, there seems to be a systematical encoding problem. When I select the transfer file and start the import, the following error message appears:

 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4'
 in position 40: ordinal not in range(128)

What do I need to change (step by step)?

  • Welcome to GIS:SE @NiklausZihlmann! Haven't used Interlis before either but what seems to be a common reason for your UnicodeEncodeError error is the username containing symbols or accents. Does your username contains these ASCII characters? – Joseph Jul 3 '17 at 9:01
  • @Joseph: no, it does not... the username is just 'nz'... – Niklaus Zihlmann Jul 3 '17 at 9:51
  • What is the default encoding of QGIS? is it ASCII? If yes, is there a way to change it to UTF-8? Might that be the problem? – Niklaus Zihlmann Jul 3 '17 at 9:54

An Interlis 1 transfer file (.itf) is always ISO-8859-1 encoded. An Interlis 2 transfer file (.xtf) is an XML file; the rules of XML apply (the encoding declaration in the xml prolog defines the encoding; default is UTF-8).

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.