Skip to content

Commit c9244e7

Browse files
committed
robust utf8 decoding
1 parent 17bc3cc commit c9244e7

File tree

14 files changed

+1486
-90
lines changed

14 files changed

+1486
-90
lines changed
File renamed without changes.
File renamed without changes.

3rdparty/utf8.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Copyright 2006 Nemanja Trifunovic
2+
3+
/*
4+
Permission is hereby granted, free of charge, to any person or organization
5+
obtaining a copy of the software and accompanying documentation covered by
6+
this license (the "Software") to use, reproduce, display, distribute,
7+
execute, and transmit the Software, and to prepare derivative works of the
8+
Software, and to permit third-parties to whom the Software is furnished to
9+
do so, all subject to the following:
10+
11+
The copyright notices in the Software and this entire statement, including
12+
the above license grant, this restriction and the following disclaimer,
13+
must be included in all copies of the Software, in whole or in part, and
14+
all derivative works of the Software, unless such copies or derivative
15+
works are solely in the form of machine-executable object code generated by
16+
a source language processor.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
21+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
22+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
23+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24+
DEALINGS IN THE SOFTWARE.
25+
*/
26+
27+
28+
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
29+
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
30+
31+
/*
32+
To control the C++ language version used by the library, you can define UTF_CPP_CPLUSPLUS macro
33+
and set it to one of the values used by the __cplusplus predefined macro.
34+
35+
For instance,
36+
#define UTF_CPP_CPLUSPLUS 199711L
37+
will cause the UTF-8 CPP library to use only types and language features available in the C++ 98 standard.
38+
Some library features will be disabled.
39+
40+
If you leave UTF_CPP_CPLUSPLUS undefined, it will be internally assigned to __cplusplus.
41+
*/
42+
43+
#include "utf8/checked.h"
44+
#include "utf8/unchecked.h"
45+
46+
#endif // header guard

0 commit comments

Comments
 (0)