Message319725
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 |
|
Date |
User |
Action |
Args |
2018-06-16 07:37:51 | xtreak | set | recipients:
+ xtreak, ronaldoussoren, vstinner, ezio.melotti, steven.daprano, serhiy.storchaka, winvinc |
2018-06-16 07:37:51 | xtreak | set | messageid: <1529134671.89.0.56676864532.issue33865@psf.upfronthosting.co.za> |
2018-06-16 07:37:51 | xtreak | link | issue33865 messages |
2018-06-16 07:37:51 | xtreak | create | |
|