<p dir="ltr">Hi Stephen,</p>
<p dir="ltr">On Apr 28, 2017 11:46 PM, "Stephen Finucane" <stephen@that.guru> wrote:<br>
><br>
> I understand the issue now - thanks for clarifying :) Sorry for the<br>
> delay in replying also.<br>
><br>
> Now, while I understand what you're doing here, I'm wondering if we<br>
> could simply revert the original patch instead. I clearly merged that<br>
> without fully understanding the issue and not only does it cause the<br>
> issues you've trying to resolve here but it seems it's not necessary<br>
> for a lot of people (including me. Fedora 24). For those users that are<br>
> affected, there are less hacky workarounds. For example, a simple<br>
> script like so would so the job, I imagine.<br>
><br>
>     $ cat pwclient2<br>
>     #!/usr/bin/env bash<br>
>     PYTHONIOENCODING=UTF-8 pwclient<br>
><br>
> I'd be happy to include an epilog detailing this issue that would<br>
> appear when you'd run '--help'. I realize that were still be an extra<br>
> step for affected users, but the vast majority aren't and wouldn't be<br>
> affected.<br>
><br>
> Would this be acceptable?</p>
<p dir="ltr">I wouldn't revert the whole patch, I remember I fixed some minor things which should remain.</p>
<p dir="ltr">However, in addition of a small help messge, we could also wrap the call to main() to display a more useful error message:</p>
<p dir="ltr">  try:<br>
      main()<br>
  except UnicodeEncodeError as e<br>
      traceback.print_traceback()<br>
      sys.stderr.write('you should export the LANG or LC_ALL environment variables\n')<br>
      sys.exit(1)<br></p>
<p dir="ltr">what do you think?</p>
<p dir="ltr">> Stephen<br>
><br>
> PS: What kind of environment are you encountering this issue in?</p>
<p dir="ltr">On debian 8 (stable).</p>
<p dir="ltr">Robin</p>