michaelrsweet / mxml

Tiny XML library.
https://www.msweet.org/mxml
Apache License 2.0
428 stars 157 forks source link

Attribute names (incorrectly) cannot start with a Unicode character #267

Closed Yurgis57 closed 3 years ago

Yurgis57 commented 3 years ago

Hi! While parsing the XML file, If the first character of unquoted Attribute name is not Ansi-127, it is replaced with 1-byte code and is not converted to Utf properly. The rest characters are OK. Element names are OK too. The effect exists from early mxml versions up to now. Could you please replace just 2 lines in minixml-3.1 -> mxml-file.c -> mxml_parse_element: name[0] = ch; (line 2191) ptr = name + 1; (line 2192) with something like that: ptr = name; if (mxml_add_char(ch, &ptr, &name, &namesize)) goto error;

michaelrsweet commented 3 years ago

Will incorporate this fix into the next Mini-XML release.

Yurgis57 commented 3 years ago

Thanks a lot

George Razutov ----- Original Message ----- From: Michael R Sweet To: michaelrsweet/mxml Cc: Yurgis57 ; Author Sent: Friday, June 12, 2020 2:15 PM Subject: Re: [michaelrsweet/mxml] Attribute names (incorrectly) cannot start with a Unicode character (#267)

Will incorporate this fix into the next Mini-XML release.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

michaelrsweet commented 3 years ago

[master dd55272] Fix handling of elements that start with a Unicode character (Issue #267)