diff --git a/scripts/unicode.py b/scripts/unicode.py index cb3e2c7..c501a9f 100644 --- a/scripts/unicode.py +++ b/scripts/unicode.py @@ -297,7 +297,7 @@ def generate_script_impl(f): #[inline] pub(crate) fn inner_short_name(self) -> &'static str { match self { - Script::Unknown => "", + Script::Unknown => "Zzzz", Script::Common => "Zyyy", Script::Inherited => "Zinh", """) @@ -312,6 +312,7 @@ def generate_script_impl(f): #[inline] pub(crate) fn inner_from_short_name(input: &str) -> Option { match input { + "Zzzz" => Some(Script::Unknown), "Zyyy" => Some(Script::Common), "Zinh" => Some(Script::Inherited), """) diff --git a/src/tables.rs b/src/tables.rs index d8c082b..28ee742 100644 --- a/src/tables.rs +++ b/src/tables.rs @@ -1598,7 +1598,7 @@ impl Script { #[inline] pub(crate) fn inner_short_name(self) -> &'static str { match self { - Script::Unknown => "", + Script::Unknown => "Zzzz", Script::Common => "Zyyy", Script::Inherited => "Zinh", Script::Adlam => "Adlm", @@ -1775,6 +1775,7 @@ impl Script { #[inline] pub(crate) fn inner_from_short_name(input: &str) -> Option { match input { + "Zzzz" => Some(Script::Unknown), "Zyyy" => Some(Script::Common), "Zinh" => Some(Script::Inherited), "Adlm" => Some(Script::Adlam),