fix(email): encode Cyrillic binaries with /utf8.
CI / test (push) Successful in 7m11s
CI / deploy-ift (push) Successful in 3m12s
CI / e2e-ift (push) Successful in 1m26s
CI / deploy-stage (push) Failing after 3m33s
CI / e2e-stage (push) Has been skipped

OTP truncates non-ASCII in <<"...">> to 8-bit bytes, garbling Russian
in mail and in-app notification copy.
This commit is contained in:
2026-08-15 00:32:33 +03:00
parent 0a1e55e036
commit e86d603f30
4 changed files with 43 additions and 38 deletions
+5 -1
View File
@@ -91,9 +91,13 @@ test_deliver_error() ->
test_template_fill() ->
{Sub, Plain, Html} = logic_email_templates:render(verify, <<"https://x/verify?token=z">>),
?assert(binary:match(Sub, <<"CalenTIQ">>) =/= nomatch),
%% OTP truncates Cyrillic in <<"...">> without /utf8 — guard real UTF-8 text
?assert(binary:match(Sub, <<"подтвердите"/utf8>>) =/= nomatch),
?assert(binary:match(Plain, <<"Подтвердите"/utf8>>) =/= nomatch),
?assert(binary:match(Plain, <<"https://x/verify?token=z">>) =/= nomatch),
?assert(binary:match(Html, <<"{{">>) =:= nomatch),
?assert(binary:match(Html, <<"https://x/verify?token=z">>) =/= nomatch).
?assert(binary:match(Html, <<"https://x/verify?token=z">>) =/= nomatch),
?assert(binary:match(Html, <<"Подтвердите"/utf8>>) =/= nomatch).
test_reminder_deliver() ->
Self = self(),