Closed epshteinmatthew closed 2 years ago
Hello,
It doesn't seem so, if I try with the following callback function:
int callback_get_test (const struct _u_request * request, struct _u_response * response, void * user_data) {
ulfius_set_string_body_response(response, 200, "\U0001f602");
return U_CALLBACK_CONTINUE;
}
the output is not an emojii, but something like 😂
I guess you would have to encode/decode the emojii to send it to the client.
My bad, a nice person just told me I forgot to set the content-type properly, if you have a callback function like this:
int callback_get_test (const struct _u_request * request, struct _u_response * response, void * user_data) {
u_map_put(response->map_header, "Content-Type", "text/plain; charset=utf-8");
ulfius_set_string_body_response(response, 200, "\U0001f602");
return U_CALLBACK_CONTINUE;
}
You have an emoji displayed in the browser, yay!
thank you very much!
Is it possible to send emojis?
//for example ulfius_set_string_body_response(response, 200, "🤗");