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

When using french accents in hostnames the inventory plugin fails on utf8 decoding. #3

Open
matthewpomeryssq opened this issue Apr 29, 2022 · 1 comment

Comments

@matthewpomeryssq
Copy link

Ex if hostname is set to "Réservé"
Inventory module will fail with: [WARNING]: * Failed to parse /export/home/netansible/micetro_test/inventory/mm_inventory.yml with mm_inventory plugin: 'utf-8' codec can't decode byte 0xe9 in position 15889: invalid continuation byte

Issue can be resolved by using ISO-8859-1 decoding here:

response = response.decode('utf8')

ex. response = response.decode('ISO-8859-1')

@tonk
Copy link

tonk commented Jun 7, 2022

As far as I know accents are not allowed in hostnames. RFC-952 states that the only allowed characters are A-Z, 0-9, - and . and that the name should start with a letter. RFC-1123 relaxes that a bit by allowing a hostname to start with a letter or a digit (2.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants