Open oussjarrousse opened 1 week ago
Do you know what needs to be changed to fix this?
We have several options. Can you confirm that the purpose of using locale.strxfrm here is to sort the categories based on the locale settings of the user?
If that was the case. We could use an alternative sorting mechanism that will respect the locale but not break on incompatible characters.
Is there a test for this function?
My plan is to:
Yes, I can confirm this. Your approach sounds great!
I've created a pull request that fixes the issue... at least for me... Looking forward for your review...
after rednotebook reads all the day files, and when it is trying to sort categories, it raises an error.
After some investigation I found out that the error is related to
locale.strxfrm
in line 516 injournal.py
:What I think is happening is that locale.strxfrm does not accept characters that are incompatible with the locale. For example, my locale is en.US.UTF-8. For example: locale.strxfrm("عربي") will raise an error
What I wish to happen, is that categories are sorted regardless of the characters type or locale.