Repository navigation
Mojibake v0.5.1
Codename: [LATIN CAPITAL LETTER Q]
Added
- Added C++ examples
- C++:
char8_tinput and output, sou8"..."literals andstd::u8stringwork with every
function - C++: option structs for designated initializers:
mjb::Options,mjb::CaseOptions,
mjb::MatchOptions, andmjb::CollationOptions - C++:
grapheme_breaks,word_breaks,sentence_breaks, andline_breaksranges of
mjb::BreakResult - C++:
mjb::encoded(bytes, encoding)output for transforms that write bytes in any encoding, and
convert_encoding<CharT>(input) - C++:
mjb::error_category()andmjb::make_error_codeformjb_status - C++:
BidiParagraph::chars()as astd::span
Changed
- New README.md
- New API.md
- C++: the wrapper requires C++20. The library still builds as C11 and C++17
- C++: every transform has two forms,
mjb::nfc(input, options)andmjb::nfc(input, out, options), which replace the_intoand_resultfunctions andmjb::TextResult. Transforms
return the input's string type and encoding, and write the encoding of the output's string type.
Optional arguments moved from positional parameters to the option structs, and the input and
output encoding parameters were removed in favour ofmjb::Textandmjb::encoded - C++: segment and codepoint ranges are
std::rangesforward, borrowed views with
std::default_sentinel_tends, so they compose with standard algorithms and adaptors. The
Breakerclasses were replaced by the break position ranges - C++: functions that return views, including the truncation functions, are constrained by the
mjb::borrowed_textconcept, and Clang warns about aTextor view that outlives its input - C++:
mjb::LibraryErrorderives fromstd::system_error;mjb::LocaleErrorwas removed - C++: codepoint predicates are free functions only, and
Character::to_utf8was removed in
favour ofmjb::encode. The C callback overload offor_each_codepointand the
mjb_filter_flagsoverloads offilterwere removed - C++: the native UTF-16 and UTF-32 encodings come from
std::endian::native
Fixed
- Removed obsolete header file