Skip to content
  • Mauro Chehab's avatar
    pwclient fix for handling messages with UTF-8 · 4fc6a169
    Mauro Chehab authored
    
    
    pwclient works fine viewing utf-8 messages, if you don't try to redirect stdout.
    
    However, if you do things like pwclient view 5063 >/tmp/patch, it fails
    due to the weird character handling logic in python:
    
    Traceback (most recent call last):
      File "/usr/local/bin/pwclient", line 446, in ?
        main()
      File "/usr/local/bin/pwclient", line 411, in main
        print s
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 249: ordinal not in range(128)
    
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
    4fc6a169