Content
View differences
Updated by Brandon Soonaye 5 days ago
## Environment
OpenProject `17.4` community with attachments on S3 storage.
## Steps to reproduce
1. Upload a UTF-8 text file containing non-ASCII characters like a `.md` or `.txt`
with accented characters) to a WP : `.md`, `.txt` or `.js`.
WP.
2. Open the attachment inline, in the browser.
## Expected
The text is displayed with correct UTF-8 :
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921417/content"> (e.g. "métier").
## Current
Non-ASCII characters render incorrectly :
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921418/content"> (e.g. "métier" shows as "métier").
## Workaround
Right click + downloading the file and opening locally still works fine with
valid UTF-8.
## Notes
Binary attachments like `.odt` (e.g. .odt) are unaffected since they are served as a
download by default rather than rendered inline.
The served Content-Type is text/plain without a charset, so the browser falls
back to legacy encoding. For S3-backed attachments the presigned URL sets
response-content-disposition but not response-content-type, so S3 returns
the stored content type without a charset.
OpenProject `17.4`
## Steps to reproduce
1. Upload a UTF-8 text file containing non-ASCII characters
The text is displayed with correct UTF-8 :
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921417/content">
## Current
Non-ASCII characters render incorrectly :
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/921418/content">
## Workaround
Right click + downloading the file and opening locally still works fine with
## Notes
Binary attachments like `.odt`
The served Content-Type is text/plain without a charset, so the browser falls