mkhorasani / Streamlit-Authenticator

A secure authentication module to validate user credentials in a Streamlit application.
Apache License 2.0
1.38k stars 229 forks source link

Configuration file support for unicode #49

Open egelados opened 1 year ago

egelados commented 1 year ago

Congratulations on your great project.

I noticed an issue when the config.yaml contains unicode characters. For example when using the reset password feature the yaml load and dump works perfectly but the process escapes all unicode chars. Unfortunately this cancels the yaml file human readability.

An simple solution would be to just use the allow_unicode parameter when dumping the config back to the filesystem:

with open('../config.yaml', 'w') as file: yaml.dump(config, file, default_flow_style=False, allow_unicode=True, sort_keys=False)

How does it sound? :)

Keep up the good work!

mkhorasani commented 1 year ago

Hey @egelados thank you for pointing this out! Sure thing, will look into it and quite probably will add it to a future release. Cheers!