Open seriyps opened 1 month ago
Given the core mission of sext
(preserving sort order), the question is whether there is any one way to do it re. Unicode (I guess the general answer to that question for Unicode is 'no').
From the Erlang docs:
Note that UTF-8 is not compatible with bytewise representation for code points between 128 and 255, so a ISO-Latin-1 bytewise representation is not generally compatible with UTF-8.
Perhaps an option would need to be introduced ...
I don't think it is a particularly popular feature, but would be nice to have it just for completeness:
(note, this is our internal fork of sext, differences are minimal)
I believe smth like this should solve the problem? Can open a PR if you don't see any obvious problem with this.
At least it works for decoding/encoding for me with this patch. Didn't check if ordering is still correct, guess it should (utf-8):