accents caused crash

Bug #1019737 reported by koalalorenzo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
command-not-found
New
Undecided
Unassigned

Bug Description

launching a non-existing command with accents the program crashed:

koalalorenzo@mybox:~$ òlò
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.2.44
koalalorenzo@mybox:~$

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Hello, thank you for filing this bug report.

Are you using putty or other ssh client to connect to your ubuntu system? If so, could you check if your locale settings are setup to use UTF-8? (on your client, the machine you are connecting from)

Revision history for this message
koalalorenzo (koalalorenzo) wrote :

I was using Coda 2 for Mac OS X. It should use UTF-8 but I can't configure that! My files are coded in UTF-8 so I think that Coda 2 use UTF-8 also for the terminal!

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Could you add the output of "locale" here (both on your mac and on your ubuntu boxes)

Revision history for this message
koalalorenzo (koalalorenzo) wrote :

Sure!

This is the locale output run on Terminal.app

MacBook-Pro-di-Lorenzo-Setale:~ koalalorenzo$ locale
LANG="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_CTYPE="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_ALL=
MacBook-Pro-di-Lorenzo-Setale:~ koalalorenzo$

This is the locale output run on Coda 2:

MacBook-Pro-di-Lorenzo-Setale:TeleTweet koalalorenzo$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
MacBook-Pro-di-Lorenzo-Setale:TeleTweet koalalorenzo$

This is the locale of my server on Coda 2 (the one that caused the problem) :

koalalorenzo@mybox :~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
koalalorenzo@mybox :~$

What should I do? Is a bug or is just me? The "locale" of my server is UTF-8!

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

There is a bug (command-not-found should not crash) but there is no good solution (I keep educating users instead which is a waste of time if done manually).

As for your case:

The problem is caused by Coda locale settings (MacBook-Pro-di-Lorenzo-Setale). Is there a way to force it to use LANG=it_IT.UTF-8?

Basically your coda ssh client talks to ubuntu using "C" (which is ASCII 7bit for the most part), you type accented characters somehow, coda does something to that (I don't know what), then ubuntu interprets that as UTF-8 (as that is your server setting) and things break.

Would you mind doing two more tests for me:

1) In your Coda ssh/terminal prompt type an accented character and press enter. _MAKE SURE NOT TO TYPE BACKSPACE AT ANY TIME_
2) Repeat the test in Terminal.app

Tell me if command-not-found breaks in either case.

Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.