Skip to content

Commit ff0c454

Browse files
committed
Fix table
1 parent d8e5ead commit ff0c454

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#UTF-8/16/32 C++ library
1+
# UTF-8/16/32 C++ library
22
This is the C++11 template based header only library to convert UFT-8/16/32 symbols and strings. Null-terminated strings are also supported.
33

44
UTF-8 and UTF-32 (UCS-32) both support 31 bit wide code points `[0‥0x7FFFFFFF]`with no restriction. UTF-16 supports only unicode code points `[0‥0x10FFFF]` where high `[0xD800‥0xDBFF]` and low `[0xDC00‥0xDFFF]` surrogate regions are prohibited.
@@ -7,23 +7,25 @@ The maximum UTF-16 symbol size is 2 words (4 bytes, both words should be from th
77
- 4 bytes for unicode code points
88
- 6 bytes for 31bit code points
99

10-
######UTF-16 surrogate decoder:
10+
###### UTF-16 surrogate decoder:
1111
|High\Low|DC00|DC01||DFFF|
1212
|:-:|:-:|:-:|:-:|:-:|
1313
|**D800**|010000|010001||0103FF|
1414
|**D801**|010400|010401||0107FF|
1515
|****|||||
1616
|**DBFF**|10FC00|10FC01||10FFFF|
1717

18-
##Supported compilers
18+
## Supported compilers
19+
1920
Tested on following compilers:
2021
- Visual Studio 2013 Update 5
2122
- Visual Studio 2015 Update 3
2223
- Visual Studio 2017
2324
- GCC 5.4.0
2425
- Clang 3.8.0
2526

26-
##Usage example
27+
## Usage example
28+
2729
```cpp
2830
// यूनिकोड
2931
static char const _Src[] = "\xE0\xA4\xAF\xE0\xA5\x82\xE0\xA4\xA8\xE0\xA4\xBF\xE0\xA4\x95\xE0\xA5\x8B\xE0\xA4\xA1";
@@ -36,8 +38,8 @@ std::vector<char> _Utf8;
3638
utf::convz<utf::utf32, utf::utf8>(_Utf32.begin(), std::back_inserter(_Utf8));
3739
```
3840

39-
##Performance
40-
####Windows x86 (Visual Studio 2013 Update 5):
41+
## Performance
42+
#### Windows x86 (Visual Studio 2013 Update 5):
4143
```cpp
4244
Running 225 test cases...
4345
Resolution: 2592001699
@@ -54,7 +56,7 @@ UTF8 ==> UTF16: 0.378968s (+74.24%)
5456
*** No errors detected
5557
```
5658

57-
####Windows x64 (Visual Studio 2013 Update 5):
59+
#### Windows x64 (Visual Studio 2013 Update 5):
5860
```cpp
5961
Running 225 test cases...
6062
Resolution: 2592004604
@@ -71,7 +73,7 @@ UTF8 ==> UTF16: 0.318946s (+51.54%)
7173
*** No errors detected
7274
```
7375

74-
####Windows x86 (Visual Studio 2017):
76+
#### Windows x86 (Visual Studio 2017):
7577
```cpp
7678
Running 225 test cases...
7779
Resolution: 2591999972
@@ -88,7 +90,7 @@ UTF8 ==> UTF16: 0.349681s (+30.00%)
8890
*** No errors detected
8991
```
9092

91-
####Windows x64 (Visual Studio 2017):
93+
#### Windows x64 (Visual Studio 2017):
9294
```cpp
9395
Running 225 test cases...
9496
Resolution: 2591998081
@@ -105,7 +107,7 @@ UTF8 ==> UTF16: 0.311356s (+30.52%)
105107
*** No errors detected
106108
```
107109

108-
####Ubuntu 16.04 LTS x64 (GCC 5.4.0):
110+
#### Ubuntu 16.04 LTS x64 (GCC 5.4.0):
109111
```cpp
110112
Running 225 test cases...
111113
Resolution: 2592003903
@@ -122,7 +124,7 @@ UTF8 ==> UTF16: 1.030013s (+448.36%)
122124
*** No errors detected
123125
```
124126

125-
####Ubuntu 16.04 LTS x64 (Clang 3.8.0):
127+
#### Ubuntu 16.04 LTS x64 (Clang 3.8.0):
126128
```cpp
127129
Running 225 test cases...
128130
Resolution: 2592004346
@@ -139,5 +141,5 @@ UTF8 ==> UTF16: 0.592549s (+243.92%)
139141
*** No errors detected
140142
```
141143

142-
##Conversion table
144+
## Conversion table
143145
![UTF-8/32 table](https://upload.wikimedia.org/wikipedia/commons/3/38/UTF-8_Encoding_Scheme.png)

0 commit comments

Comments
 (0)