fix int overflow preserving the old behavior
avoid strlen() usage in loop
avoid repeated strlen usage
make xml_utf8_ encode/decode work with size_t
better way to check for empty string
fix ftell/fseek calls
reduce struct size by 8 byte on 64 bit
fix ftell/fseek calls
fix format
avoid strlen usage in the loop