Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 354090 Details for
Bug 477964
=app-misc/media-player-info-19: chokes on utf-8 character during install
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
media-player-info-19-utf8.patch (text/plain), 2.30 KB, created by
Alexandre Rostovtsev (RETIRED)
on 2013-07-24 12:45:03 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Alexandre Rostovtsev (RETIRED)
Created:
2013-07-24 12:45:03 UTC
Size:
2.30 KB
patch
obsolete
>From ebb67c584203f368c9937c3b909ea4b97813c7d1 Mon Sep 17 00:00:00 2001 >From: Alexandre Rostovtsev <tetromino@gentoo.org> >Date: Wed, 24 Jul 2013 08:40:52 -0400 >Subject: [PATCH] Do not assume build is being run in a utf8 locale > >https://bugs.freedesktop.org/show_bug.cgi?id=67242 >--- > tools/mpi2hwdb.py | 5 +++-- > tools/mpi2udev.py | 5 +++-- > tools/udev-syntax-check.py | 2 +- > 3 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/tools/mpi2hwdb.py b/tools/mpi2hwdb.py >index b54c4ec..76454a1 100755 >--- a/tools/mpi2hwdb.py >+++ b/tools/mpi2hwdb.py >@@ -25,7 +25,7 @@ def parse_mpi(mpi): > '''Print hwdb file for given ConfigParser object.''' > > cp = configparser.RawConfigParser() >- assert cp.read(mpi) >+ assert cp.read(mpi, encoding='utf8') > > # if we have more info than just idVendor+idProduct we need to use an udev rule, > # so don't write an hwdb entry >@@ -38,7 +38,8 @@ def parse_mpi(mpi): > > try: > m = cp.get('Device', 'product') >- print('#', m) >+ # print() chokes on utf8 product names in a non-utf8 locale >+ sys.stdout.buffer.write(('# ' + m + '\n').encode('utf8')) > except configparser.NoOptionError: > pass > >diff --git a/tools/mpi2udev.py b/tools/mpi2udev.py >index c6ac33f..fe82b11 100755 >--- a/tools/mpi2udev.py >+++ b/tools/mpi2udev.py >@@ -34,7 +34,7 @@ def parse_mpi(mpi, hwdb): > '''Print udev rule for given ConfigParser object.''' > > cp = configparser.RawConfigParser() >- assert cp.read(mpi) >+ assert cp.read(mpi, encoding='utf8') > > rule = '' > >@@ -75,7 +75,8 @@ def parse_mpi(mpi, hwdb): > > try: > m = cp.get('Device', 'product') >- print('# ' + m) >+ # print() chokes on utf8 product names in a non-utf8 locale >+ sys.stdout.buffer.write(('# ' + m + '\n').encode('utf8')) > except configparser.NoOptionError: > pass > >diff --git a/tools/udev-syntax-check.py b/tools/udev-syntax-check.py >index 71490de..e13c750 100755 >--- a/tools/udev-syntax-check.py >+++ b/tools/udev-syntax-check.py >@@ -33,7 +33,7 @@ args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9_.-]+)}\s*=\s*"([^"]*)"$' > result = 0 > lineno = 0 > for path in sys.argv[1:]: >- for line in open(path): >+ for line in open(path, encoding='utf8'): > lineno += 1 > > # filter out comments and empty lines >-- >1.8.3.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 477964
:
354060
|
354062
|
354064
| 354090