mirror of
https://gitlab.com/dstftw/youtube-dl.git
synced 2020-11-16 09:42:26 +00:00
Merge remote-tracking branch 'Asido/master'
This commit is contained in:
commit
1a9c655e3b
|
@ -37,15 +37,13 @@ def preferredencoding():
|
|||
Returns the best encoding scheme for the system, based on
|
||||
locale.getpreferredencoding() and some further tweaks.
|
||||
"""
|
||||
def yield_preferredencoding():
|
||||
try:
|
||||
pref = locale.getpreferredencoding()
|
||||
u'TEST'.encode(pref)
|
||||
except:
|
||||
pref = 'UTF-8'
|
||||
while True:
|
||||
yield pref
|
||||
return yield_preferredencoding().next()
|
||||
try:
|
||||
pref = locale.getpreferredencoding()
|
||||
u'TEST'.encode(pref)
|
||||
except:
|
||||
pref = 'UTF-8'
|
||||
|
||||
return pref
|
||||
|
||||
|
||||
def htmlentity_transform(matchobj):
|
||||
|
|
Loading…
Reference in a new issue