Subscribe to this thread
Home - General / All posts - Defining encoding of Tables in Export
tomasfa
182 post(s)
#24-Mar-18 05:24

Hi. I usually only us Manifold 8 or 9. But I have a request from a client, that he wants me to export some SHP files with UTF-8 encoding. I can't, in M8 or R9. I solved the issue, exporting from whatever Manifold version, but then import to QGIS and than export again using UTF-8.

Can M8 do something to export directly into SHP with UTF-8 encoding???

I read a lot of the manuals and forum and couldn't find anything, else than why we should use other formats instead of Shapefiles. Which I totally support, but the client insists.

Any help or ideas.

adamw


10,447 post(s)
#24-Mar-18 06:47

DBF files do not support UTF8 directly. For SHP files, there is a way to specify that DBF is going to contain UTF8 by using a small text file (CPG). When working with DBF files specified to be UTF8 in this way, we both read and write UTF8, but we do not create such files during export.

We will think about adding an export option for this. In the meantime, you might try this: export the drawing to <filename>.SHP, create a text file in Notepad containing 'UTF-8', save the text file as <filename>.CPG, switch to 9, link the SHP, open the drawing inside the SHP, delete all existing records, then copy / paste all records from the original drawing.

tomasfa
182 post(s)
#26-Mar-18 09:14

THank you Adam. I did what you say it worked. But I also tried just exporting regularly from M8 and it worked out OK, only after I changed all the local characters (some letters like ñ) I removed every letter not compatible and keep it all column names with less than 10 letters and it worked great. Later I added the CPG file, and keeped going OK. Best regards.

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.