mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibUnicode: Update out-of-date spec links
And remove links that aren't adding much value but will often get out of date (i.e. links to UCD files, which are already all listed in unicode_data.cmake).
This commit is contained in:
parent
142abc0b2e
commit
8d9fb898d7
3 changed files with 10 additions and 14 deletions
|
@ -30,8 +30,7 @@ struct CodePointRange {
|
||||||
u32 last;
|
u32 last;
|
||||||
};
|
};
|
||||||
|
|
||||||
// SpecialCasing source: https://www.unicode.org/Public/13.0.0/ucd/SpecialCasing.txt
|
// https://www.unicode.org/reports/tr44/#SpecialCasing.txt
|
||||||
// Field descriptions: https://www.unicode.org/reports/tr44/tr44-13.html#SpecialCasing.txt
|
|
||||||
struct SpecialCasing {
|
struct SpecialCasing {
|
||||||
u32 index { 0 };
|
u32 index { 0 };
|
||||||
u32 code_point { 0 };
|
u32 code_point { 0 };
|
||||||
|
@ -42,7 +41,7 @@ struct SpecialCasing {
|
||||||
DeprecatedString condition;
|
DeprecatedString condition;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Field descriptions: https://www.unicode.org/reports/tr44/#Character_Decomposition_Mappings
|
// https://www.unicode.org/reports/tr44/#Character_Decomposition_Mappings
|
||||||
struct CodePointDecomposition {
|
struct CodePointDecomposition {
|
||||||
// `tag` is a string since it's used for codegen as an enum value.
|
// `tag` is a string since it's used for codegen as an enum value.
|
||||||
DeprecatedString tag { "Canonical"sv };
|
DeprecatedString tag { "Canonical"sv };
|
||||||
|
@ -50,12 +49,10 @@ struct CodePointDecomposition {
|
||||||
size_t decomposition_size { 0 };
|
size_t decomposition_size { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
// PropList source: https://www.unicode.org/Public/13.0.0/ucd/PropList.txt
|
// https://www.unicode.org/reports/tr44/#PropList.txt
|
||||||
// Property descriptions: https://www.unicode.org/reports/tr44/tr44-13.html#PropList.txt
|
|
||||||
using PropList = HashMap<DeprecatedString, Vector<CodePointRange>>;
|
using PropList = HashMap<DeprecatedString, Vector<CodePointRange>>;
|
||||||
|
|
||||||
// Normalization source: https://www.unicode.org/Public/13.0.0/ucd/DerivedNormalizationProps.txt
|
// https://www.unicode.org/reports/tr44/#DerivedNormalizationProps.txt
|
||||||
// Normalization descriptions: https://www.unicode.org/reports/tr44/#DerivedNormalizationProps.txt
|
|
||||||
enum class QuickCheck {
|
enum class QuickCheck {
|
||||||
Yes,
|
Yes,
|
||||||
No,
|
No,
|
||||||
|
@ -75,9 +72,7 @@ struct CodePointName {
|
||||||
size_t name { 0 };
|
size_t name { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
// UnicodeData source: https://www.unicode.org/Public/13.0.0/ucd/UnicodeData.txt
|
// https://www.unicode.org/reports/tr44/#UnicodeData.txt
|
||||||
// Field descriptions: https://www.unicode.org/reports/tr44/tr44-13.html#UnicodeData.txt
|
|
||||||
// https://www.unicode.org/reports/tr44/#General_Category_Values
|
|
||||||
struct CodePointData {
|
struct CodePointData {
|
||||||
u32 code_point { 0 };
|
u32 code_point { 0 };
|
||||||
DeprecatedString name;
|
DeprecatedString name;
|
||||||
|
@ -128,6 +123,7 @@ struct UnicodeData {
|
||||||
HashMap<u32, size_t> code_point_display_name_aliases;
|
HashMap<u32, size_t> code_point_display_name_aliases;
|
||||||
Vector<CodePointName> code_point_display_names;
|
Vector<CodePointName> code_point_display_names;
|
||||||
|
|
||||||
|
// https://www.unicode.org/reports/tr44/#General_Category_Values
|
||||||
PropList general_categories;
|
PropList general_categories;
|
||||||
Vector<Alias> general_category_aliases;
|
Vector<Alias> general_category_aliases;
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
# include <LibUnicode/UnicodeData.h>
|
# include <LibUnicode/UnicodeData.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For details on the algorithms used here, see Section 3.13 Default Case Algorithms
|
|
||||||
// https://www.unicode.org/versions/Unicode13.0.0/ch03.pdf
|
|
||||||
|
|
||||||
namespace Unicode {
|
namespace Unicode {
|
||||||
|
|
||||||
Optional<DeprecatedString> __attribute__((weak)) code_point_display_name(u32) { return {}; }
|
Optional<DeprecatedString> __attribute__((weak)) code_point_display_name(u32) { return {}; }
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// For details on the algorithms used here, see Section 3.13 Default Case Algorithms
|
// For details on the algorithms used here, see Section 3.13 Default Case Algorithms
|
||||||
// https://www.unicode.org/versions/Unicode13.0.0/ch03.pdf
|
// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf
|
||||||
|
|
||||||
namespace Unicode::Detail {
|
namespace Unicode::Detail {
|
||||||
|
|
||||||
|
@ -197,6 +197,7 @@ static SpecialCasing const* find_matching_special_case(u32 code_point, Utf8View
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G34078
|
||||||
ErrorOr<void> build_lowercase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
ErrorOr<void> build_lowercase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
||||||
{
|
{
|
||||||
#if ENABLE_UNICODE_DATA
|
#if ENABLE_UNICODE_DATA
|
||||||
|
@ -223,6 +224,7 @@ ErrorOr<void> build_lowercase_string([[maybe_unused]] Utf8View code_points, [[ma
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G34078
|
||||||
ErrorOr<void> build_uppercase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
ErrorOr<void> build_uppercase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
||||||
{
|
{
|
||||||
#if ENABLE_UNICODE_DATA
|
#if ENABLE_UNICODE_DATA
|
||||||
|
@ -249,6 +251,7 @@ ErrorOr<void> build_uppercase_string([[maybe_unused]] Utf8View code_points, [[ma
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf#G34078
|
||||||
ErrorOr<void> build_titlecase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
ErrorOr<void> build_titlecase_string([[maybe_unused]] Utf8View code_points, [[maybe_unused]] StringBuilder& builder, [[maybe_unused]] Optional<StringView> const& locale)
|
||||||
{
|
{
|
||||||
#if ENABLE_UNICODE_DATA
|
#if ENABLE_UNICODE_DATA
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue