]> gitweb @ CieloNegro.org - youtube-dl.git/blobdiff - youtube-dl
Use getpreferredencoding() instead of getdefaultlocale()
[youtube-dl.git] / youtube-dl
index 0abfaef38876c323b41c24d4b898e5b2615420ed..bc7e3b5fe9c6dffc68f6ca78f1d4a5faf382a0b3 100755 (executable)
@@ -19,7 +19,7 @@ import urllib
 import urllib2
 
 std_headers = {
-       'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5',
+       'User-Agent': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8',
        'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
        'Accept': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
        'Accept-Language': 'en-us,en;q=0.5',
@@ -1056,7 +1056,7 @@ if __name__ == '__main__':
                youtube_search_ie = YoutubeSearchIE(youtube_ie)
 
                # File downloader
-               charset = locale.getdefaultlocale()[1]
+               charset = locale.getpreferredencoding()
                if charset is None:
                        charset = 'ascii'
                fd = FileDownloader({