Merge lp:~mvo/ubuntu-release-upgrader/lp1071388 into lp:ubuntu-release-upgrader
| Status: | Merged |
|---|---|
| Approved by: | Barry Warsaw on 2012-11-14 |
| Approved revision: | 2587 |
| Merged at revision: | 2595 |
| Proposed branch: | lp:~mvo/ubuntu-release-upgrader/lp1071388 |
| Merge into: | lp:ubuntu-release-upgrader |
| Diff against target: |
147 lines (+37/-10) 3 files modified
DistUpgrade/DistUpgradeView.py (+9/-2) DistUpgrade/DistUpgradeViewText.py (+16/-8) tests/test_view.py (+12/-0) |
| To merge this branch: | bzr merge lp:~mvo/ubuntu-release-upgrader/lp1071388 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Barry Warsaw | 2012-11-05 | Pending | |
|
Review via email:
|
|||
Description of the Change
This should fix the encoding issue in LP: #1068389 when the users enters non-ascii answers in the text view.
| Michael Vogt (mvo) wrote : | # |
| Barry Warsaw (barry) wrote : | # |
A couple of quick thoughts: you might want to use "utf-8" instead of "utf8". It doesn't matter in practice, but better matches what getpreferredenc
Also, in Python 3, we're generally calling subprocess.
http://
decoding the results of sys.stdin.
| Michael Vogt (mvo) wrote : | # |
On Wed, Nov 07, 2012 at 08:47:18PM -0000, Barry Warsaw wrote:
> A couple of quick thoughts: you might want to use "utf-8" instead of "utf8". It doesn't matter in practice, but better matches what getpreferredenc
Thanks, I fixed that.
> Also, in Python 3, we're generally calling subprocess.
>
> http://
Thanks, I will have to look in more details, but afaict this is also
because we get the data as bytes sometimes.
> decoding the results of sys.stdin.
This code runs under py2 most of the time as the upgrade needs to be
support back to precise with the default install there. I.e.:
$ python -c 'import sys; print sys.getdefaulte
ascii
$ python3 -c 'import sys; print(sys.
utf-8
And it seems like py2 does not honor PYTHONIOENCODING :/
Cheers,
Michael
| Barry Warsaw (barry) wrote : | # |
Michael, have you pushed an update? The diff doesn't look any different.
- 2588. By Michael Vogt on 2012-11-30
-
DistUpgrade/
DistUpgradeView .py: fix ENCODING

This also needs backporting to the quantal version of the release upgrader.