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

utf-8 encoding xml output #15

Open
Tracked by #3
yvecai opened this issue Dec 25, 2012 · 3 comments
Open
Tracked by #3

utf-8 encoding xml output #15

yvecai opened this issue Dec 25, 2012 · 3 comments

Comments

@yvecai
Copy link

yvecai commented Dec 25, 2012

Better results are obtained using an explicit utf-8 encoding of tag values:

f.write(etree.tostring(xmlobject, pretty_print=True,encoding='UTF-8'))

@pnorman
Copy link
Owner

pnorman commented Dec 28, 2012

Please provide a testcase where the current method has issues so that the changes can be verified

@devemux86
Copy link

In some cases it works for me if I make a .cpg file - used to specify the code page (only for .dbf) for identifying the character encoding to be used. And put in it the encoding:
utf-8

@pnorman
Copy link
Owner

pnorman commented Apr 7, 2013

It's also worth noting that the encoding of shapefiles is an absolute mess. The spec default is not UTF-8 but this is becoming the de-facto default.

You may need to use some combination of ogr2ogr and ogr2osm encoding settings to get sensible results.

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

No branches or pull requests

3 participants