Skip to content

Fix data checker by forcing LC_ALL=C - #837

Merged
lukhnos merged 2 commits into
openvanilla:masterfrom
ChiahongHong:checker
May 31, 2026
Merged

Fix data checker by forcing LC_ALL=C#837
lukhnos merged 2 commits into
openvanilla:masterfrom
ChiahongHong:checker

Conversation

@ChiahongHong

@ChiahongHong ChiahongHong commented May 30, 2026

Copy link
Copy Markdown
Contributor

This PR fixes our data checker, which has apparently been broken for quite a while...

When LC_ALL is not explicitly set, the default locale is usually something like en_US.UTF-8. Under that locale, sort -u may collapse many CJK strings into the same collation group, which means make check under Data was basically failing to catch real differences : )

Since #833 added new entries without adding them to phrase.occ, causing the check to fail. I discovered this while preparing another PR, because GitHub Actions started failing on the macos-15-arm64 20260527.0100.1 runner image. It may have changed some locale settings or tool versions.

$ make check
(empty)
$ LC_ALL=C make check

--- /dev/fd/63  2026-05-31 02:55:52
+++ /dev/fd/62  2026-05-31 02:55:52
@@ -1555,7 +1555,6 @@
 丁字形
 丁字褲
 丁字鎬
-丁學忠
 丁守中
 丁憂
 丁母憂
@@ -9871,7 +9870,6 @@
 何月何日
 何樂不為
 何樂而不為
-何欣純
 何止
 何況
 何況是
 ......

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Source/Data/Makefile to export LC_ALL=C for the check target, ensuring consistent locale behavior during the execution of the check commands. There are no review comments, and I have no additional feedback to provide.

@lukhnos lukhnos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@lukhnos
lukhnos merged commit 6316592 into openvanilla:master May 31, 2026
3 checks passed
lukhnos added a commit to lukhnos/McBopomofo that referenced this pull request May 31, 2026
"崐" from openvanilla#833
"𡻈" from openvanilla#75

Those are the only two characters with score -99.0. For 𡻈 it's
problematic because it's ranked lower than the emoji 🪡 because of it.

Also fixes the `sort` Makefile recipe based on how the issue was fixed
in openvanilla#837

Also updates the byte length in `check` from 3 to 4, because "𡻈" is
actually 4 bytes long in UTF-8.
@ChiahongHong
ChiahongHong deleted the checker branch June 13, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants