GNOME Bugzilla – Bug 474883
Please document macros in chvalid (and xmlChar use)
Last modified: 2021-07-05 13:24:54 UTC
Documentation Section: http://xmlsoft.org/html/libxml-chvalid.html#xmlIsBlank_ch This is an example, no macro in chvalid seems to be documented: Macro: xmlIsBlank_ch #define xmlIsBlank_ch Automatically generated by genChRanges.py Correct version: This is an example, I don't know what the parameters and return values are, hence the desire for documentation: Macro: xmlIsBlank_ch( ch ) Returns true if the UTF8 (int) ch is a whitespace character, false otherwise. Other information: It was difficult to find the function in the API which checks if a character is whitespace. In general, some documentation of how to work with xmlChar and unicode characters would be nice. Is it correct that xmlChar * is a UTF-8 encoded string? What is the difference between xmlIsBlankQ and xmlIsBlank_ch? The function xmlIsBlankNode in tree.c has a loop: while (*cur != 0) { if (!IS_BLANK_CH(*cur)) return(0); cur++; } Is this correct? What if a xmlChar *string character is more than one byte long? Don't you need to use the xmlGetUTF8Char function for the above loop? Why doesn't the prototype for xmlGetUTF8Char use const xmlChar * instead of "const unsigned char *"? I am confused? Have I misunderstood things completely? Where is this stuff documented?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.