Commit Graph

2 Commits

Author SHA1 Message Date
Tomasz Sowa 463cec3283 fixed #2: Procedures for reading an utf8 string incorrectly read some utf-8 characters.
Those characters were treated as invalid characters.

UTF8ToInt_FirstOctet incorrectly checked if the first octed is zero (after removing first bits).
This is a case only if the utf-8 character consists of two bytes. For 3 or 4 bytes
the first part can have all bits equal zero.
2021-05-07 15:53:19 +02:00
Tomasz Sowa fac3a7eb71 reorganization in utf8
- utf8 auxiliary functions moved to utf8_private.h file
- in utf8.h are shown only functions available for consumers
- template functions has been moved to utf8_template.h (in utf8.h are only declarations)
  utf8_template.h is included at the end of utf8.h
- functions which take std::ostream changed to template (the stream is a template argument now)
2021-03-15 19:34:51 +01:00