GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
UNICODE::CANONICAL(3) Courier Unicode Library UNICODE::CANONICAL(3)

unicode::canonical, unicode::decompose, unicode::decompose_default_reallocate, unicode::compose, unicode::compose_default_callback - unicode canonical normalization and denormalization

#include <courier-unicode.h>
constexpr int decompose_flag_qc=UNICODE_DECOMPOSE_FLAG_QC;
constexpr int decompose_flag_compat=UNICODE_DECOMPOSE_FLAG_COMPAT;
constexpr int compose_flag_removeunused=UNICODE_COMPOSE_FLAG_REMOVEUNUSED;
constexpr int compose_flag_oneshot=UNICODE_COMPOSE_FLAG_ONESHOT;

void decompose_default_reallocate(std::u32string &string, const std::vector<std::tuple<size_t, size_t>> &list);

void decompose(std::u32string &string, int flags=0, const std::function<void (std::u32string &, const std::vector<std::tuple<size_t, size_t>>)> &reallocate=decompose_default_reallocate);

void compose_default_callback(unicode_composition_t &compositions);

void compose(std::u32string &string, int flags=0, const std::function<void (unicode_composition_t &)> &cb=compose_default_reallocate);

These functions implement the C++ interface for the Unicode Canonical Decomposition and Composition[1], See the description of the underlying unicode_canonical(3) C library API for more information. C++ specific notes:

•The C++ decomposition reallocate callback receives a single vector of offset and size tuples instead of two separate arrays or vectors. unicode::decompose_default_reallocate() is the C++ version of the default reallocate callback. It receives the receiving the same tuple vector parameter, too. The C++ interface use std::u32strings to represent Unicode text strings, and unicode::decompose_default_reallocate() resizes it.

Like the C callback, the C++ one gets called 0 or more times.

unicode::compose() takes care of initializing, applying, and de-initialization the unicode_composition_t object, for decomposition. The callback receives a reference to the unicode_composition_t object, which the callback should not modify in any way.

courier-unicode(7), unicode_canonical(3).

Sam Varshavchik
Author

1.
Unicode Canonical Decomposition and Composition
https://www.unicode.org/reports/tr15/tr15-50.html
03/12/2021 Courier Unicode Library

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.