mirror of https://github.com/ansible/ansible.git
Make all parts of messages and pathnames into unicode so that we don't get UnicodeError tracebacks.
Note that the fix for display normalizing to unicode is correct but the fix for pathnames is probably not. Changing pathnames to unicode type means that we will handle utf8 pathnames fine but pathnames can be any sequence of bytes that do not contain null. We do not handle sequences of bytes that are not valid utf8 here. To do that we need to revamp the handling of basedir and paths to transform to bytes instead of unicode. Didn't want to do that in 2.0.x as it will potentially introduce other bugs as we find all the places that we combine basedir with other path elements. Since no one has raised that as an issue thus far so it's not something we need to handle yet. But it's something to keep in mind for the future. To test utf8 handling, create a utf8 directory and run a playbook from within there. To test non-utf8 handling (currently doesn't work as stated above), create a directory with non-utf8 chars an run a playbook from there. In bash, create that directory like this: mkdir $'\377' Fixes #13937pull/14009/head
parent
742bd2c554
commit
40373dea4d
Loading…
Reference in New Issue