← Back to issue list

snapcraft register doesn't support non-latin characters

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1809584
Type
issue
State
open
Author
~kornelski
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft 2.43.1 register crashed when its confirmation prompt emitted U+2018 under a non-UTF-8 locale; the current ASCII-only prompt resolves the reported path.

Suggested action: close resolved

Reason: The traceback fails specifically on U+2018 emitted by the register confirmation prompt, and the reporter confirmed that LC_ALL=en_US.utf8 avoids it. Commit 1c4f5ed72 introduced the current StoreRegisterCommand, whose confirmation text uses only ASCII quotes and no longer routes the prompt through Click, eliminating the reported failure.

Evaluated by: mr-cal-bot

Impact: 34 Quick Win: 23 Complexity: 24 Confidence: 89 Actionability: 88

Issue body

Using this file: https://github.com/kornelski/pngquant/blob/8b686cd3c32704f4dbe0e0904f1ec87d60d6e64e/snapcraft.yaml and running snapcraft register pngquant I get: Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.43.1', 'console_scripts', 'snapcraft')() File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/store.py", line 115, in register if click.confirm(_MESSAGE_REGISTER_CONFIRM.format(snap_name)): File "/usr/lib/python3/dist-packages/click/termui.py", line 138, in confirm echo(prompt, nl=False, err=err) File "/usr/lib/python3/dist-packages/click/utils.py", line 259, in echo file.write(message) UnicodeEncodeError: 'latin-1' codec can't encode character '\u2018' in position 255: ordinal not in range(256)

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 34
Quick Win: 23
Complexity: 24
Confidence: 89
Actionability: 88
close resolved Snapcraft 2.43.1 register crashed when its confirmation prompt emitted U+2018 under a non-UTF-8 locale; the current ASCII-only prompt resolves the reported path.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 28
Complexity: 10
Confidence: 94
Actionability: 90
close resolved Snapcraft 2.43.1's register confirmation could crash under a Latin-1 locale after emitting U+2018; the current command uses ASCII-only text and no longer has this failure.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 9
Complexity: 25
Confidence: 68
Actionability: 35
needs triage The v2.43.1 register confirmation prompt can crash with UnicodeEncodeError in a Latin-1 terminal. The affected Click code has since been replaced, but UTF-8 locale output was not verified.
qwen/qwen3.8-27b
Impact: 30
Quick Win: 22
Staleness: 95
Complexity: 25
Confidence: 72
Support Request: 10
close stale snapcraft register crashes with UnicodeEncodeError on latin-1 terminals due to non-latin chars in click.confirm prompt. Reported against v2.43.1 (2018); code path since rewritten to craft-cli emit/input, no maintainer interaction in 7.7 years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 90
Support Request: 5
close stale Reports a UnicodeEncodeError when running snapcraft register due to non-latin characters in CLI prompts. Issue is 7.5 years old with no maintainer response or labels.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 20
Confidence: 95
Support Request: 0
close stale snapcraft register fails with UnicodeEncodeError when snap name contains non-latin characters. Issue is 7+ years old with no activity or maintainer response.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 30
Confidence: 80
Support Request: 10
close stale Reports a UnicodeEncodeError when registering a snap with non-Latin characters using snapcraft 2.43.1. The stack trace points to the click library's terminal encoding limitation. No maintainer response in over 7 years.

Update history

Date Change
created

Related work

  • Related To: snapcraft (launchpad)#1649181 (confidence 85%)

    Another legacy Snapcraft issue reports locale-dependent ASCII encoding failures, although it concerns a different command and subsystem.

Related issues

No related issues found above the similarity threshold.