Skip to content

add utf8 supporting for config file(yaml) #3980

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

Closed
wants to merge 2 commits into from

Conversation

sumkire
Copy link

@sumkire sumkire commented Feb 2, 2018

add utf8 supporting for config file(yaml)

@Kami
Copy link
Member

Kami commented Feb 2, 2018

Thank you for your contribution.

Can you please also add a test case for this change (loading config which uses unicode characters)?

@sumkire
Copy link
Author

sumkire commented Feb 5, 2018

Already added.

Copy link
Member

@cognifloyd cognifloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this test right? I think the password test doesn't match the fixture ini file.

config = parser.parse()
print parser.config_file_path
print config
self.assertEqual(config['credentials']['password'], u'测试')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this 测试 doesn't match what's in st2client/tests/fixtures/test_unicode.ini: 密码

Though I like your use of "test" and "password" (translation from google translate) in the tests. :)

@Kami Kami added this to the 2.7.0 milestone Feb 6, 2018
@Kami Kami closed this in #3989 Feb 6, 2018
@Kami
Copy link
Member

Kami commented Feb 6, 2018

Fixed the test case in #3989 and merged it into master.

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants