memos.exe corrupts CJK text on Windows — uses system codepage (GBK) instead of UTF-8
Pre-submission checklist | 提交前检查
- [x] I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
- [x] I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
- [x] This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题
Bug Description | 问题描述
Bug Description
memos.exe (Rust binary) corrupts all Chinese/Japanese/Korean text on Windows. Characters are double-encoded: the binary internally converts UTF-8 input to the Windows system codepage (GBK/CP936) before sending to the API, causing irreversible data corruption.
How to Reproduce | 如何重现
Steps to Reproduce
# 1. Add a Chinese memory
memos add -m "测试中文记忆存储"
# 2. Search for it
memos search "中文记忆" --format json --detail simple
### Environment | 环境信息
### Environment
- **OS:** Windows 11 Enterprise 10.0.22631
- **CLI version:** `@memtensor/[email protected]` (Rust binary, PE32+ x86-64)
- **Shell:** Git Bash (MSYS2) — passes UTF-8 args correctly
- **System codepage:** ACP=936 (GBK), OEMCP=936 (GBK)
- **Node.js wrapper:** spawns `memos.exe` via `child_process.spawn` with `stdio: "inherit"`
### Additional Context | 其他信息
_No response_
### Willingness to Implement | 实现意愿
- [ ] I'm willing to implement this myself | 我愿意自己解决
- [ ] I would like someone else to implement this | 我希望其他人来解决
🤖 AutoDev has picked up this issue and started working on it.
Task ID: 45cf01d97f427948
Working branch: bugfix/autodev-1904
Target branch: main
Workflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
🤔 AutoDev needs a human checkpoint before continuing.
Issue: #1904 memos.exe corrupts CJK text on Windows
Task ID: 45cf01d97f427948
Working branch: bugfix/autodev-1904
Workflow: opsp (analysis → coding → testing → PR)
Checkpoint reason
AutoDev completed OPSP Phase 1 analysis, but the current MemTensor/MemOS repository does not appear to contain the implementation referenced by this issue:
- No Rust source files or
Cargo.toml - No
@memtensor/memos-cloud-cli/memos-cloud-clireferences - No
memos.exereferences - No wrapper that appears to spawn
memos.exe
The reported bug appears to belong to a downstream Rust CLI binary/package outside this repository.
Suggested default assumption
Continue in MemTensor/MemOS with a docs/troubleshooting workaround, and clearly note that the real binary fix should be made in the Rust CLI source repository.
Please reply with one of these commands:
/autodev confirm yes— continue with the suggested default assumption/autodev confirm no <additional info>— provide the correct repository/scope or other direction/autodev cancel— cancel this AutoDev task
If there is no reply within 24h, AutoDev will continue with the suggested default assumption.
⏰ AutoDev task 45cf01d97f427948 received no /autodev confirm reply within 24h. Proceeding with the default assumption. You can still provide feedback during PR review.
❌ AutoDev task 45cf01d97f427948 failed.
Summary: AutoDev could not create the pull request. Error: AutoDev could not create the pull request: Validation Failed: {"resource":"PullRequest","code":"custom","message":"No commits between dev-20260615-v2.0.20 and bugfix/autodev-1904"} - https://docs.github.com/rest/pulls/pulls#create-a-pull-request
Thanks for reporting this. We have triaged it and confirmed this belongs to the Windows binary distributed by @memtensor/memos-cloud-cli, not the MemOS Python/core repository.
The CJK text appears to be corrupted before it reaches the MemOS API: the reported environment uses @memtensor/[email protected], Windows memos.exe, GBK/CP936 system codepage, and a Node wrapper spawning the binary.
We are moving tracking to MemTensor/MemOS-Cloud-CLI: https://github.com/MemTensor/MemOS-Cloud-CLI/issues/15
Please follow that issue for the fix and release update. We will keep this issue linked or closed here to avoid split tracking.