Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly encode output as UTF-8 #237

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 24, 2017

  1. Explicitly encode output as UTF-8

    I think I've covered all the cases we need to, but there could be more.
    
    This is needed as if a locale isn't set to UTF-8, an error will result
    of this form:
    
      UnicodeEncodeError: 'ascii' codec can't encode character u'\u0113' in position 60: ordinal not in range(128)
    
    While the ideal solution is for the user to set their locale to UTF-8,
    it is better that we print debug output which may not be displayed
    correctly than that we output a fatal (and non-obvious) error,
    potentially some time into processing.
    
    This also fixes some cases of implicitly combining str and *obj together
    when printing debug output, which fails with some Python versions, by
    explicitly using str.join(obj).
    nickjwhite committed Oct 24, 2017
    Configuration menu
    Copy the full SHA
    c4ae4b2 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2017

  1. Explicitly encode output as UTF-8 for ocropus-errs and ocropus-econf

    I accidentally missed these from the original commit (c4ae4b).
    Nick White authored and nickjwhite committed Nov 27, 2017
    Configuration menu
    Copy the full SHA
    6c5784e View commit details
    Browse the repository at this point in the history