Unicode normalization
Related
Consider
Specifically
NFC FAQ
Normalization stability
https://www.unicode.org/policies/stability_policy.html#Normalization
Erlang
Programming Language
Implemented in erlang through unicode:characters_to_nf*_binary/list
https://erlang.org/doc/man/unicode.html#characters_to_nfc_binary-1
Normalize = fun(X) ->
%% This might be only needed if the input is not an unicode string
%% For example, it contains 'ó' pairs instead of 'ó'
Uni = unicode:characters_to_binary(X, utf8),
Decomposed = unicode:characters_to_nfkd_list(Uni),
Filtered = lists:filter(fun(X) -> X < 256 end, Decomposed),
%% Convert back from list to binary, might not be needed.
list_to_binary(Filtered)
end.