[kbd] [PATCH] src/libkeymap: better error message on unsupported unicode value
Anisse Astier
anisse at astier.eu
Wed Mar 3 20:09:43 MSK 2021
The auto-generated (with ckbcomp) file fr-bepo_afnor did not load (even
partially), because of an U+1f12f (copyleft symbol) that is wrongly
parsed, generating this error message:
too many (160) entries on one line
Fix libkeymap so that the symbol can be parsed, and later generate a
better error message:
unicode keysym out of range: U+1f12f
At least users will know what is wrong with their keymap.
Signed-off-by: Anisse Astier <anisse at astier.eu>
---
src/libkeymap/analyze.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l
index 9e76eae..4f9a6fa 100644
--- a/src/libkeymap/analyze.l
+++ b/src/libkeymap/analyze.l
@@ -319,7 +319,7 @@ Include include[ \t]*
Decimal [1-9][0-9]*
Octal 0[0-7]*
Hex 0[xX][0-9a-fA-F]+
-Unicode U\+([0-9a-fA-F]){4}
+Unicode U\+([0-9a-fA-F]){4,6}
Literal [a-zA-Z][a-zA-Z_0-9]*
Octa ([0-7]){1,3}
Charset charset|Charset|CharSet|CHARSET
--
2.29.2
More information about the kbd
mailing list