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

Possible problem with pugixml::xml_document::load_file + non+ASCII filenames + windows #159

Closed
LebedevRI opened this issue Aug 23, 2017 · 2 comments

Comments

@LebedevRI
Copy link

LebedevRI commented Aug 23, 2017

Hi. This is pugixml 1.8 + mingw 64 bit
When we do

  xml_document doc;
  xml_parse_result result = doc.load_file(docname);

where docname is some filename that was not specially previously converted to windows wide characters (so i guess it's utf8?), the load_file() fails.
Are we supposed to manually convert to wide-character first?

@zeux
Copy link
Owner

zeux commented Aug 23, 2017

Where do you get docname path from? That would determine whether it's UTF-8 or not.

If it is then this is sort of a duplicate of #45 - the current workaround is to use doc.load_file(pugi::as_wide(docname).c_str()). load_file uses fopen with the given path as is (which can be good or bad depending on how you look at it...)

@LebedevRI
Copy link
Author

Ok, i'm being told that the workaround works.

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

2 participants