libosmscout
0.1
|
Parse and transform an UTF8 string. More...
#include <utf8helper.h>
Public Types | |
enum | Exit { Done = 0, Continue, Error } |
Public Member Functions | |
Parser (const Parser &)=default | |
Parser (utf8helper::Transform func) | |
void | Reset () |
Public Attributes | |
byte | b [3] |
int | context |
utf8helper::Transform | func |
Exit(* | run )(Parser *, byte) |
codepoint | u |
char | u_size |
Parse and transform an UTF8 string.
See https://tools.ietf.org/html/rfc3629
UTF8 encoding standard provides backward compatibility with the ASCII string. Illegal sequences will be discarded for security reason: see RFC 3629 #10. For each valid sequence, It picks the corresponding predefined table, If none has been defined, then the sequence is dumped as it is. Otherwise, the functor is called for the found character and the new sequence will be dumped instead.
|
explicit |
References Reset().
|
default |
void utf8helper::Parser::Reset | ( | ) |
References utf8helper::_p0(), context, utf8helper::IsBreaker, utf8helper::IsSpace, utf8helper::NullCodepoint, run, u, and u_size.
Referenced by utf8helper::UTF8String::Clear(), and Parser().
byte utf8helper::Parser::b[3] |
int utf8helper::Parser::context |
Referenced by utf8helper::_p0(), utf8helper::_p1_u2(), utf8helper::_p2_u3(), utf8helper::_p3_u4(), and Reset().
utf8helper::Transform utf8helper::Parser::func |
codepoint utf8helper::Parser::u |
char utf8helper::Parser::u_size |