Select to view content in your preferred language

Invalid argument: UTF8 contains invalid characters

146
2
Saturday
Labels (3)
happygis
Emerging Contributor

     I developed an application using Maui. When opening a shapefile, it prompts with the error "Invalid argument: UTF8 contains invalid characters". After research, I found that there are field names in the shapefile that are in Chinese. How can I solve this problem? Is there a setting for encoding in ArcGIS Runtime?

      Another strange thing is that the program runs normally under Windows, but it has this issue only on Android. I haven't tested it on iOS。

0 Kudos
2 Replies
happygis
Emerging Contributor

   I have now added a cpg file and set the encoding corresponding to dbf. It runs normally in the Windows environment (if I modify the cpg code page to a different value, the same error will be reported when running in Windows), but the same problem still occurs in Android. It seems that when ArcGIS Runtime reads the shapefile in the Android environment, the cpf file does not work.
     But both Windows and Android environments use the same ArcGIS runtime library, so there shouldn't be different results. That's weird. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Any chance you can share the shapefile causing this problem?

0 Kudos