-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
打出不在 Unicode 基础多文本平面(Unicode 点位超过 U+FFFF)的字符时,中间的答案提示显示异常 #10
Labels
Comments
大概看了一下,这是因为JavaScript中遍历 $(".box").each(function (index) {
const $box = $(this);
const userInput = input[index];
const correctChar = translation[index];
$box.text(userInput || "");
if (!userInput) {
$box.css("background-color", "#9ca3af25");
} else if (userInput === correctChar) {
$box.css("background-color", "#79b851");
} else if (translation.includes(userInput)) {
$box.css("background-color", "#f3c237");
} else {
$box.css("background-color", "#9ca3af25");
}
}); 实际上简体中文语言文件里没有BMP以外的字符,但是为了防止在酒吧里点炒饭,还是换用 |
现在已经修复了Unihan字符的问题,但是Emoji中还带U+200D没法正常组合…… |
你需要 |
破案了,是初始的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如下图。
随便打点什么「𰻝𰻝面」的「𰻝」(U+30EDD)也可以观察到一样的问题。
Chromium 内核版本 125.0.6422.112。
疑似是强行显示一对 surrogate pair 的结果。估计是什么库没处理对 UTF-16……
The text was updated successfully, but these errors were encountered: