Skip to content

Commit

Permalink
README.md cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
ww898 committed May 7, 2019
1 parent 904d769 commit c310e45
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is the C++11 template based header only library under Windows/Linux/MacOs t

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.

The maximum UTF-16 symbol size is 2 words (4 bytes, both words should be in the surrogate region). UFT-32 (UCS-32) is always 1 word (4 bytes). UTF-8 has the maximum symbol size (see [conversion table](#conversion-table)):
The maximum UTF-16 symbol size is 2 words (4 bytes, both words should be in the surrogate region). UFT-32 (UCS-32) is always 1 word (4 bytes). UTF-8 has the maximum symbol size (see [conversion table](#utf-8-conversion-table) for details):
- 4 bytes for unicode code points
- 6 bytes for 31bit code points

Expand Down Expand Up @@ -54,5 +54,5 @@ Tested on following compilers:
std::is_same<utf_selector_t<decltype(u32)::value_type>, utf_selector_t<decltype(uw)::value_type>>::value, "Fail");
```
## Conversion table
## UTF-8 Conversion table
![UTF-8/32 table](https://upload.wikimedia.org/wikipedia/commons/3/38/UTF-8_Encoding_Scheme.png)
2 changes: 1 addition & 1 deletion perf/clang_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ UTF8 ==> UTFW : 0.340444965s (+151.96%)
*** No errors detected
```
*Attention:* the strange results for UTF16 to UTF8 and UTFW to UTF8 convertions. I suppose that there is no input data checking in codecvt library.
**Attention:** the strange results for UTF16 to UTF8 and UTFW to UTF8 convertions. I suppose that there is no input data checking in codecvt library.
2 changes: 1 addition & 1 deletion perf/clang_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ UTF8 ==> UTFW : 0.295663358s (+154.24%)
*** No errors detected
```
*Attention:* the strange results for UTF16 to UTF8 and UTFW to UTF8 convertions. I suppose that there is no input data checking in codecvt library.
**Attention:** the strange results for UTF16 to UTF8 and UTFW to UTF8 convertions. I suppose that there is no input data checking in codecvt library.
2 changes: 1 addition & 1 deletion perf/gnu_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ UTF8 ==> UTFW : 0.674670587s (+885.93%)
*** No errors detected
```
*Attention:* the strange results for UTFW to UTF8 convertion. I suppose that there is no input data checking in codecvt library.
**Attention:** the strange results for UTFW to UTF8 convertion. I suppose that there is no input data checking in codecvt library.

0 comments on commit c310e45

Please sign in to comment.