Fix invalid_encoding error when using extended plane characters in vcard.

This commit is contained in:
Paweł Chmielowski 2021-04-29 14:21:37 +02:00
parent 5a8f1ca528
commit 78c09789f7
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@
{rebar_elixir_plugin, ".*", {git, "https://github.com/processone/rebar_elixir_plugin", "0.1.0"}}}},
{if_var_true, sqlite,
{sqlite3, ".*", {git, "https://github.com/processone/erlang-sqlite3", {tag, "1.1.12"}}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.25"}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", "6d143ebcacaafe3a8adc669300a8ad001402b3d8"}},
{if_var_true, stun,
{stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.43"}}}},
{xmpp, ".*", {git, "https://github.com/processone/xmpp", {tag, "1.5.3"}}},

View File

@ -424,9 +424,9 @@ set_vcard(User, LServer, VCARD) ->
-spec string2lower(binary()) -> binary().
string2lower(String) ->
case stringprep:tolower(String) of
case stringprep:tolower_nofilter(String) of
Lower when is_binary(Lower) -> Lower;
error -> str:to_lower(String)
error -> String
end.
-spec mk_tfield(binary(), binary(), binary()) -> xdata_field().