kubuntu-devel-release-upgrade fails when LANG=de_DE.UTF-8

Bug #980020 reported by Ernst Kloppenburg
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
kdesudo (Ubuntu)
Confirmed
High
Unassigned

Bug Description

$ kubuntu-devel-release-upgrade
Traceback (most recent call last):
  File "/usr/bin/do-release-upgrade", line 77, in <module>
    print _("Checking for a new ubuntu release")
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 27: ordinal not in range(128)

$ env LANG= kubuntu-devel-release-upgrade
... works fine

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: update-manager-kde 1:0.152.25.8
ProcVersionSignature: Ubuntu 3.0.0-17.30-generic 3.0.22
Uname: Linux 3.0.0-17-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Thu Apr 12 18:01:49 2012
InstallationMedia: Kubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.2)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: update-manager
UpgradeStatus: Upgraded to oneiric on 2012-04-12 (0 days ago)

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :
tags: added: dist-upgrade
Colin Watson (cjwatson)
Changed in update-manager (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Marc Cheng (bdgraue) wrote :

$ env LANG= kubuntu-devel-release-upgrade

does not work for me

Revision history for this message
Brian Murray (brian-murray) wrote :

I wonder if this is related to bug 929399.

Revision history for this message
Marc Cheng (bdgraue) wrote :

might indeed be related in some kind, because i don't get the error when i run

$ LANGUAGE=en:en LC_ALL=C kubuntu-devel-release-upgrade

(might even be wrong how i use the command, but in this case no error)

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

The problem is not with update-manager, but with kdesudo (oneiric)!

/usr/bin/kubuntu-devel-release-upgrade just executes
kdesudo "do-release-upgrade -m desktop -f kde -d"

Calling just "do-release-upgrade -m desktop -f kde -d" works fine, and you see the first console output line with a german umlaut.

Run with kdesudo, kdesudo has to read that output from do-release-upgrade and echo it to the console. That fails.

This reasoning can be proved by doing a simple experiment (all in an environment with LANG=de_DE.UTF8)

$echo 'print u"Gl\xfcck"' > tmp.py
$python tmp.py # OK
Glück
$kdesudo python tmp.py
# fails with UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 2: ordinal not in range(128)

@Brian: what is the best way to proceed?
- reassign this bug to kdesudo? With updated bug description?

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

the above also answers the question from comment #3:
No, this is not related to bug 929399 where kdesudo is non involved

Revision history for this message
Brian Murray (brian-murray) wrote :

I've reassigned this to kdesudo - thanks for the detailed testing Ernst.

affects: update-manager (Ubuntu) → kdesudo (Ubuntu)
Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

probably my testcase for printing unicode with python (which I took from a stackoverflow question) was not correct

This would be better:
$ echo 'print "m\xc3\xbcde"' tmp2.py
$ python tmp2.py
müde

$ kdesudo python tmp2.py
müde
# garbage but no error

so I guess kdesudo changes something in the environment that makes do-release-upgrade produce bad output

Revision history for this message
Shinjo Park (peremen) wrote :

I was amazed that this bug is still there for 6+ years. On Kubuntu 17.10 I also got the broken text from kdesudo when lang is ko_KR, and I think kdesudo is assuming current terminal charset is latin1:

$ do-release-upgrade -m desktop -f DistUpgradeViewKDE
새 우분투 배포판 확인
새로운 릴리즈를 찾을 수 없습니다.
$ kdesudo "do-release-upgrade -m desktop -f DistUpgradeViewKDE"
ì ì°ë¶í¬ ë°°í¬í íì¸
ìë¡ì´ 릴리ì¦ë¥¼ ì°¾ì ì ììµëë¤.
$ kdesudo "do-release-upgrade -m desktop -f DistUpgradeViewKDE" | iconv -t latin1 | iconv -f utf8
새 우분투 배포판 확인
새로운 릴리즈를 찾을 수 없습니다.

Version information:
$ kdesudo --version
Qt: 4.8.7
KDE 개발 플랫폼: 4.14.34
KdeSudo: 3.4.2.3

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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