Skip to content

memos.exe corrupts CJK text on Windows — uses system codepage (GBK) instead of UTF-8 #1904

@gto999

Description

@gto999

Pre-submission checklist | 提交前检查

  • I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • 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/memos-cloud-cli@1.0.2` (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 | 我希望其他人来解决

Metadata

Metadata

Assignees

Labels

ai-waitingai opsp human checkpointbugSomething isn't working | 功能异常help wantedExtra attention is needed | 需要社区帮助memosCore MemOS logic (memory, MCP, scheduler, API, database) | 核心模块

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions