Skip to content

Use UTF-8 for adaptive CRAG docs - #852

Merged
jernejfrank merged 1 commit into
apache:mainfrom
Ghraven:fix/adaptive-crag-docs-utf8
Jul 26, 2026
Merged

jernejfrank merged 1 commit into
apache:mainfrom
Ghraven:fix/adaptive-crag-docs-utf8

Conversation

@Ghraven

@Ghraven Ghraven commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read adaptive CRAG example text documents with explicit UTF-8 encoding
  • keep the existing short-document merge behavior unchanged

Problem

Path.read_text() uses the platform default encoding when no encoding is provided. On Windows or other non-UTF-8 locales, the adaptive CRAG example can fail when docs contain non-ASCII content.

Before / After

Before: docs were decoded with the local default encoding.

After: docs are decoded as UTF-8 consistently.

Verification

  • python -m py_compile examples/adaptive-crag/application.py

@github-actions github-actions Bot added the area/examples Relates to /examples label Jul 25, 2026

@jernejfrank jernejfrank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@jernejfrank
jernejfrank merged commit 71d4fd3 into apache:main Jul 26, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/examples Relates to /examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants