Table of contents

Unicode normalization

%3 cluster_8e846a77_1263_4abe_a5da_485b3e9a7850 Unicode normalization _da07315f_9e89_4c8e_a3d5_3c17a755a28f Erlang _f0dec2bf_20ec_4970_9f30_45f85d18ab6a Erlang _da07315f_9e89_4c8e_a3d5_3c17a755a28f->_f0dec2bf_20ec_4970_9f30_45f85d18ab6a _2ea1da5b_45f6_49ee_b93d_ad6cf380dfe4 Unicode _59af5ff8_1718_42bd_b36c_bd62dfa95dce Stop Writing Dead Programs _59af5ff8_1718_42bd_b36c_bd62dfa95dce->_da07315f_9e89_4c8e_a3d5_3c17a755a28f __0:cluster_8e846a77_1263_4abe_a5da_485b3e9a7850->_2ea1da5b_45f6_49ee_b93d_ad6cf380dfe4

Erlang

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.