From ec9c8e682d615cd2b51ea0fec05273ed4dcad50a Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Mon, 3 Jan 2022 15:15:09 +0100 Subject: Documentation --- debian/README.Debian | 96 +--------------------------------------------- debian/copyright | 2 +- debian/libunicode-dev.docs | 1 + debian/unicode-tools.docs | 1 + 4 files changed, 4 insertions(+), 96 deletions(-) create mode 100644 debian/libunicode-dev.docs create mode 100644 debian/unicode-tools.docs (limited to 'debian') diff --git a/debian/README.Debian b/debian/README.Debian index 0a47d0a..29bd4b9 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -3,101 +3,7 @@ unicode for Debian This package is the Debian version of unicode, a C++ library for Unicode encoding. - -CLI interface (package unicode-tools) -------------------------------------- - -* unicode-recode - - Usage: recode - Format: - UTF-8 UTF-8 - UTF-16 UTF-16, native endian - UTF-16LE UTF-16, little endian - UTF-16BE UTF-16, big endian - UTF-32 UTF-32, native endian - UTF-32LE UTF-32, little endian - UTF-32BE UTF-32, big endian - ISO-8859-1 ISO-8859-1 (Latin-1) - ISO-8859-15 ISO-8859-15 (Latin-9) - Exit code: 0 if valid, 1 otherwise. - -* unicode-validate - - Usage: validate - Format: - UTF-8 UTF-8 - UTF-16 UTF-16, big or little endian - UTF-16LE UTF-16, little endian - UTF-16BE UTF-16, big endian - UTF-32 UTF-32, big or little endian - UTF-32LE UTF-32, little endian - UTF-32BE UTF-32, big endian - Exit code: 0 if valid, 1 otherwise. - - -C++ interface (package libunicode-dev) --------------------------------------- - -Example: - -#include -... - - std::string utf8_value {u8"äöü"}; - std::u16string utf16_value{unicode::convert(utf8_value)}; - -And for C++20: - - std::u8string utf8_value {u8"äöü"}; - std::u16string utf16_value{unicode::convert(utf8_value)}; - -The following encodings are implicitly deducted from types: - * char resp. char8_t (C++20): UTF-8 - * char16_t: UTF-16 - * char32_t: UTF-32 - -You can specify different container types directly: - - std::deque utf8_value {...}; - std::list utf16_value{unicode::convert, std::list>(utf8_value)}; - -Explicit encoding specification is also possible: - - std::string value {"äöü"}; - std::u32string utf32_value{unicode::convert(value)}; - -Supported encodings are: - - * unicode::UTF_8 - * unicode::UTF_16 - * unicode::UTF_32 - * unicode::ISO_8859_1 - * unicode::ISO_8859_15 - -Supported basic types: - * char - * char8_t (C++20) - * wchar_t (UTF-16 on Windows, UTF-32 on Linux) - * char16_t - * char32_t - * uint8_t, int8_t - * uint16_t, int16_t - * uint32_t, int32_t - * basically, all basic 8-bit, 16-bit and 32-bit that can encode - UTF-8, UTF-16 and UTF-32, respectively. - -Supported container types: - * All std container types that can be iterated (vector, list, deque, array) - * Source and target containers can be different container types - -Validation can be done like this: - - bool valid{unicode::is_valid_utf(utf16_value)}; - -Or via explicit encoding specification: - - bool valid{unicode::is_valid_utf(utf8_value)}; +See README.txt for usage. Contact diff --git a/debian/copyright b/debian/copyright index 850d014..b82bee0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,4 +1,4 @@ -Author: Roland Reichwein , 2021 +Author: Roland Reichwein , 2021, 2022 Both upstream source code and Debian packaging is available under the conditions of CC0 1.0 Universal diff --git a/debian/libunicode-dev.docs b/debian/libunicode-dev.docs new file mode 100644 index 0000000..71dfd5b --- /dev/null +++ b/debian/libunicode-dev.docs @@ -0,0 +1 @@ +README.txt diff --git a/debian/unicode-tools.docs b/debian/unicode-tools.docs new file mode 100644 index 0000000..71dfd5b --- /dev/null +++ b/debian/unicode-tools.docs @@ -0,0 +1 @@ +README.txt -- cgit v1.2.3