Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:
Thanks @serhiy.storchaka . I looked into the code and it seems the resolution is done in `search_function` at Lib/encodings/__init__.py . It seems that encoding is normalized using some logic and then we use the normalized encoding to check against aliases which is the dictionary where I have added the alias. If it's not found then '.' is replaced with '_' to check again. I hope this is the place where I need to check if aliased_encoding is None after both attempts and norm_encoding is all digits then prepend "cp" to norm_encoding to check again against `aliases` dictionary. Unfortunately, print and pdb doesn't work inside the function and I don't know how to test this change or write test cases for the same. Any pointers will be highly helpful. Thanks ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33865> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com