snapcraft fails if desktop file included "ascii" cannot decode byte
Metadata
Current evaluation
Fixed by snapcraft PRs #1304 and #1309: cleanbuild containers use C.UTF-8, and desktop files are explicitly read and written as UTF-8.
Resolution: closed resolved
Reason: PR #1304 was merged as commit 56004496c, setting cleanbuild containers to C.UTF-8. PR #1309 was merged as e5751c733, forcing UTF-8 desktop-file handling.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When including the project .desktop file building the snap fails:
'ascii' codec can't decode byte 0xc3 in position 51: ordinal not in range(128)
Generated desktop file is attached. As well as the snapcraft file.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcraft PRs #1304 and #1309: cleanbuild containers use C.UTF-8, and desktop files are explicitly read and written as UTF-8. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed desktop-file builds by forcing UTF-8 reads and writes in merged PR canonical/snapcraft#1309 (commit e5751c733); PR #1304 also set cleanbuild containers to C.UTF-8. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed the desktop-file encoding failure by using UTF-8 for reads and writes in merged PR canonical/snapcraft#1309 (commit e5751c733). | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft build failures triggered by non-ASCII characters in desktop files caused an ASCII codec decode error. The report received no comments or patches and was abandoned, likely superseded by upstream UTF-8 handling improvements. | |
| qwen/qwen3.6-35b-a3b | — | — | A snapcraft build failure triggered by non-ASCII characters in desktop files was closed without resolution or comments, likely abandoned due to inactivity. No fix or workaround was documented. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1309
(confidence 100%)
Merged as e5751c733 to read and write desktop files using UTF-8.
-
Likely Fixed By:
canonical/snapcraft#1304
(confidence 99%)
Merged as 56004496c to set the cleanbuild container locale to C.UTF-8.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1628457 snapcraft fails on s390x with utf8 error | snapcraft (launchpad) | closed | Snapcraft's s390x UTF-8/surrogate failure was fixed by merged PR snapcore/snapcraft#838, adding encoding-aware file handling in pluginhandler (commit 01848ee71). | |
| #1309 meta: read and write the desktop file with utf-8 encoding | snapcraft | merged | Merged in snapcraft#1309 via commit e5751c733, fixing UTF-8 handling when reading and writing desktop files and adding integration coverage for LP #1662456. |