Repository navigation
Fix knowledge-base folder mount UTF-8 mojibake on Windows - #31
Merged
Merged
Conversation
Keep folder picker and mount listing on UTF-8 so Chinese paths and filenames are not shown as Latin-1/CP1252 mojibake. Mount and list preview require only the knowledge feature switch, not a ready embedding model. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Form defaults from FastAPI must not be treated as filenames. Changelog notes the Windows mojibake and mount-first 409 fix. Co-authored-by: XYAI Labs <haoboy8@gmail.com>
XYAIStudio
marked this pull request as ready for review
September 16, 2026 07:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows knowledge-base local folder mount showed Chinese paths and filenames as UTF-8-as-Latin-1/CP1252 mojibake (for example
项ç�®ç»�æ��.pnginstead of项目结构.png). Mount and list preview also surfaced409 KNOWLEDGE_PREREQUISITES_FAILEDwhen the embedding model was not ready, or when a bad path was mapped to that same code.This PR keeps mount-first:
KNOWLEDGE_MOUNT_INVALID(400) instead of a prerequisites 409.Does not merge or replace any Release branch.
Target branch
develop(feature / fix — default)main(release/*orhotfix/*only)Type of change
Test plan
make all(full ship bar not run here; targeted suites below are green)Verification:
uv run ruff checkon touched Python files: passeduv run mypy --stricton touched modules: passeduv run pytesttargeted (test_win_utf8,test_knowledge_mount,test_knowledge_bases,tests/unit/i18n,test_host_dirs, desktop folder-picker source check): 140 passed, 1 skippedcd dashboard && npx tsc --noEmit: passednpx vitest run(utf8Mojibake,desktopFolder,LocalMountPanel,pickKnowledgeFolder): 8 passedgo testfor the desktop package was not run to completion here (Wails/GTK headers missing on this Linux image). Encoding helpers are covered by Go unit tests in CI environments that build Wails, plus a Python source assertion.Checklist
CHANGELOG.md(if user-facing)