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 encode xml strings #115

Open
rajanski opened this issue Jun 1, 2023 · 3 comments
Open

utf-8 encode xml strings #115

rajanski opened this issue Jun 1, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@rajanski
Copy link

rajanski commented Jun 1, 2023

I ran into some problems when there where special chars within the xml (layer title for example) . I needed to use data=data.encode('utf-8') to make requests work

@iamtekson iamtekson added the enhancement New feature or request label Jun 1, 2023
@jacklinna
Copy link

maybe remove it

@iboates
Copy link
Collaborator

iboates commented Jun 24, 2024

@rajanski Can you give me a specific example about which method you were calling and what you were passing? Generally you should always use utf-8 when possible, and if your source data is not in utf-8 then I think using .encode("utf-8") is a reasonable expectation.

@greenkarmic
Copy link

I currently have the same issue with french accented characters. All my strings are utf8 but somehow they are not sent to geoserver as utf8. Before I started using geoserver-rest I was making some requests to the Geoserver REST API myself and had encountered the same issue, which I fixed using encode('utf-8') on the JSON data being passed to requests.post. I don't see a way to replicate this fix with geoserver-rest, is there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants