Skip to content

[Bug]: windows unicode path bug #626

Description

@fixfox202507-pixel

Description

您好,我这边发现在 Windows 环境下测试 zvec 的 Unicode 路径支持时,发现部分 Unicode 路径可以正常使用,但部分路径在调用 collection.insert() 时失败。

测试结果:
C:\temp\zvec_unicode_test\测试中文\rag_zvec ✅
C:\temp\zvec_unicode_test\テストパス\rag_zvec ✅
C:\temp\zvec_unicode_test\中文_テスト_테스트\rag_zvec ✅
C:\temp\zvec_unicode_test\테스트 경로\rag_zvec ❌
C:\temp\zvec_unicode_test\di22222ci。。-cmy\rag_zvec ❌

对于失败的路径:
create_and_open() 成功
create_index() 成功
collection.insert() 失败

Steps to Reproduce

使用部分路径创建zvec库插入报错

Logs / Stack Trace

Traceback (most recent call last):
  File "C:\xxx\1.py", line 59, in <module>
    result = collection.insert(docs)
  File "C:\Users\xxx\miniforge3\envs\database\lib\site-packages\zvec\model\collection.py", line 265, in insert
    results = self._obj.Insert(
RuntimeError: No mapping for the Unicode character exists in the target multi-byte code page.

Operating System

windows 11

Build & Runtime Environment

zvec 0.6.0

Additional Context

  • I've checked git status — no uncommitted submodule changes
  • I built with CMAKE_BUILD_TYPE=Debug
  • This occurs with or without COVERAGE=ON
  • The issue involves Python ↔ C++ integration (pybind11)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions