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

[strcut_xml][fix] fix parse Chinese text in xml #533

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

qicosmos
Copy link
Collaborator

@qicosmos qicosmos commented Dec 20, 2023

Why

Close #520

What is changing

Example

struct some_object {
  int id;
  std::string name;
};

int main() {
  std::string xml_str = R"(<some_object><id>20</id><name>小强</name></some_object>)";
  some_object obj2;
  iguana::from_xml(obj2, xml_str);
  assert(obj2.id == 20);
  assert(obj2.name == "小强");
}

@qicosmos qicosmos changed the title update strcut_xml [strcut_xml][fix] fix parse Chinese text in xml Dec 20, 2023
@qicosmos qicosmos merged commit 72238a5 into alibaba:main Dec 20, 2023
30 checks passed
@qicosmos qicosmos deleted the update_struct_xml branch June 18, 2024 03:44
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

Successfully merging this pull request may close these issues.

struct_xml反序列化不支持中文问题
1 participant