[Bug 1069019] Re: [software-properties-gtk] can not delete, enable or modify any software source with non-ASCII characters in the comment

Julian Andres Klode juliank at ubuntu.com
Tue Mar 18 19:06:12 UTC 2014


Attaching a better approach then the currently broken one.

Instead of using unicode in Python 2, keep bytes there. This will work
all the time, because those objects do not care about encoding at all.
An additional unicode() is provided to decode an entry, considering it
as UTF-8.

In Python 3, open the files in UTF-8, and provide a bytes() method to
encode them as UTF-8 again.

Please note that this bug does not happen if you do not run programs in
the non-unicode C locale. If you want to interface with utf-8 files in a
language-agnostic environment, use the C.UTF-8 locale. Other apps will
break just as well.

** Patch added: "unicode.diff"
   https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1069019/+attachment/4030998/+files/unicode.diff

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1069019

Title:
  [software-properties-gtk] can not delete, enable or modify any
  software source with non-ASCII characters in the comment

Status in “python-apt” package in Ubuntu:
  Fix Released
Status in “python-apt” source package in Saucy:
  Triaged

Bug description:
  I've tried to reenable PPA's after upgrading the system, so there is
  no reaction on delete button and no any changes after modifying data
  via modify dialog. I can't even enable a source.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: software-properties-gtk 0.92.9
  ProcVersionSignature: Ubuntu 3.5.0-17.28-generic 3.5.5
  Uname: Linux 3.5.0-17-generic i686
  ApportVersion: 2.6.1-0ubuntu4
  Architecture: i386
  Date: Sat Oct 20 16:07:59 2012
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
  MarkForUpload: True
  PackageArchitecture: all
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=ru_RU.UTF-8
   SHELL=/bin/bash
  SourcePackage: software-properties
  UpgradeStatus: Upgraded to quantal on 2012-10-19 (1 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1069019/+subscriptions



More information about the foundations-bugs mailing list