diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index aab07945786cec..de6abc890dc200 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -1413,9 +1413,11 @@ static void Query(const FunctionCallbackInfo& args) { Local string = args[1].As(); auto wrap = std::make_unique(channel, req_wrap_obj); - node::Utf8Value name(env->isolate(), string); + node::Utf8Value utf8name(env->isolate(), string); + auto plain_name = utf8name.ToStringView(); + std::string name = ada::idna::to_ascii(plain_name); channel->ModifyActivityQueryCount(1); - int err = wrap->Send(*name); + int err = wrap->Send(name.c_str()); if (err) { channel->ModifyActivityQueryCount(-1); } else {