XML encoding declaration mismatch in .strings files causes localized names to fail
Nobody has claimed this yet.
- #1205 by @webkubor — closed without merging
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- macos, swift, xml
- Domain
- build-system, localization
Research direction
The payload names no repository file, so start by finding how the app's String Catalogs (.xcstrings) become InfoPlist.strings in the built bundle — look at the Xcode project's build phases and any packaging script that runs xcodebuild/productbuild. Reproduce by building one locale and running file and xxd on the resulting .lproj/InfoPlist.strings to confirm the BOM versus the declared encoding. Done looks like the declaration matching the actual bytes and the input menu showing 鼠须管 after a rebuild; the issue only promises a build-time fix in an unmerged PR, so check with maintainers before writing it.
Written by the indexing model from the issue text.
Description
Description
The localized bundle names (e.g., 鼠须管) are not displayed in the input menu. Instead, the English name "Squirrel" always appears.
Root Cause
Xcode 26.5 compiles String Catalogs (.xcstrings) into .strings files with UTF-16LE byte encoding, but the XML declaration incorrectly claims UTF-8:
<?xml version="1.0" encoding="UTF-8"?>
This mismatch causes macOS to fail parsing the files, falling back to the default (English) bundle name.
Evidence
Extracted from the official Squirrel-1.1.2.pkg:
$ file zh-Hans.lproj/InfoPlist.strings
zh-Hans.lproj/InfoPlist.strings: XML 1.0 document, UTF-16 Little Endian code unit, ...
$ head -c 100 zh-Hans.lproj/InfoPlist.strings | xxd
00000000: fffe 3c00 3f00 7800 6d00 6c00 2000 7600 ..<.?.x.m.l. .v.
00000010: 6500 7200 7300 6900 6f00 6e00 3d00 2200 e.r.s.i.o.n.=.".
00000020: 3100 2e00 3000 2200 2000 6500 6e00 6300 1.0.". .e.n.c.
00000030: 6f00 6400 6900 6e00 6700 3d00 2200 5500 o.d.i.n.g.=.".U.
00000040: 5400 4600 2d00 3800 2200 3f00 3e00 T.F.-.8.".?.>.
The file is clearly UTF-16LE (BOM: ff fe), but declares UTF-8.
Impact
- Chinese users see "Squirrel" instead of "鼠须管" in the input menu
- Traditional Chinese users see "Squirrel" instead of "鼠鬚管"
- All localized UI strings fail to load
Fix
PR #XXX provides a build-time fix that corrects the XML declaration to match the actual byte encoding.
Environment
- macOS 26.5.2
- Xcode 26.5 (Build 17C52)
- Squirrel 1.1.2
- Dominant language
- Swift
- Stars
- 6.6k
- Forks
- 586
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rime/squirrel
-
停用自动更新提示的说明Open
Difficulty 1/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 4/5 1-2 days Newbie friendliness 56/100
-
[Feature request] 按候选窗宽度自动决定每页候选数 / Fill candidate page by panel width instead of fixed page_sizeOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
[Bug] macOS 27 输入源切换 HUD 中鼠须管图标为不透明浅色底板May be free again A pull request for this issue was closed without being merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#59692 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
DuarteSantos8/openGym#1582 ·
Maintainers usually reply within 5 days