From 304c64dab88954a4c87fe6bac0bb2b867e3a626f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Tue, 6 Oct 2026 19:01:14 -0400 Subject: [PATCH] Read spaced-out CJK in the harness OCR --- bin/omarchy-iso-test | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-iso-test b/bin/omarchy-iso-test index da7fb97..2228ca5 100755 --- a/bin/omarchy-iso-test +++ b/bin/omarchy-iso-test @@ -261,7 +261,12 @@ ocr_screen() { screendump "$shot" [[ -s $shot ]] || return 0 magick "$shot" -colorspace gray -negate -resize 150% "$prepped" 2>/dev/null || return 0 - tesseract "$prepped" - --psm 6 -l "$OCR_LANGS" 2>/dev/null || true + # tesseract spaces out CJK characters, so China runs also emit each line without spaces. + if [[ $REGION == "china" ]]; then + tesseract "$prepped" - --psm 6 -l "$OCR_LANGS" 2>/dev/null | sed 'p; s/ //g' || true + else + tesseract "$prepped" - --psm 6 -l "$OCR_LANGS" 2>/dev/null || true + fi } # Wait until the console shows the given text. Saves the offending screen as