opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix: encode non-ASCII directory paths in HTTP headers

Open jwaterwater opened this issue 1 week ago • 1 comments

Fixes error when directory paths contain non-ASCII characters (e.g., Chinese) by using percent-encoding for the x-opencode-directory header, as HTTP headers must be ISO-8859-1 compatible.

jwaterwater avatar Jan 07 '26 01:01 jwaterwater

The following comment was made by an LLM, it may be inaccurate:

I found a related PR:

Potential Related PR:

  • PR #7031: "fix(app) TypeError: Failed to execute 'set' on 'Headers': String contains non IS0-8859-1 code point."
    • URL: https://github.com/anomalyco/opencode/pull/7031
    • This appears to be addressing the same underlying issue - HTTP headers with non-ISO-8859-1 characters causing failures. It may be a related or previous attempt to fix the same problem.

You should check if PR #7031 is already closed/merged and whether it addresses the same root cause, as this could indicate a duplicate effort.

github-actions[bot] avatar Jan 07 '26 01:01 github-actions[bot]