Bug 345701 - CMD -script in /usr/share/kde4/apps/konversation/scripts/ has problems with UTF-8 (Python 2.x)
Summary: CMD -script in /usr/share/kde4/apps/konversation/scripts/ has problems with U...
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-30 20:26 UTC by Sputnik
Modified: 2015-04-01 18:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sputnik 2015-03-30 20:26:38 UTC
From IRC: #konversation@freenode.net

[20:23:58] The cmd-script in /usr/share/kde4/apps/konversation/scripts/ for my Konversation 1.5-master #4303 has problems with UTF-8. Some output does not come through. Has someone fixed this already in between?
[20:24:57] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128) - the typical python problem before python 3…
[…]
[20:25:59] <Sho_> but yeah, I just tried /cmd echo 대단하다 and got nothing
[20:26:10] <Sho_> don't have error output atm, but guessing it ran into the same
[20:26:42] <Sho_> Could you file a ticket at http://bugs.kde.org/ please? 
[20:27:22] <Sho_> or 감사합니다 in keeping with the above testcase

Reproducible: Always

Steps to Reproduce:
1. start konversation from the terminal
2. type /cmd echo 대단하다


Actual Results:  
3. output on the terminal: 
traceback (most recent call last):
  File "/usr/share/kde4/apps/konversation/scripts/cmd", line 49, in <module>
    stdout = [line.rstrip() for line in result[0].decode().splitlines() if len(line.strip())]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xeb in position 0: ordinal not in range(128)



대단하다 inside of Konversation
Comment 1 Eike Hein 2015-04-01 18:21:27 UTC
Git commit 6b8e1db8742ad440da9dcbfcc652b81b13976263 by Eike Hein.
Committed on 01/04/2015 at 18:20.
Pushed by hein into branch '1.6'.

Default to Utf-8 even on Python 2.

M  +2    -2    data/scripts/cmd

http://commits.kde.org/konversation/6b8e1db8742ad440da9dcbfcc652b81b13976263