From 0490176b675eb3ea36cd51fa5d1fd41a3126c10c Mon Sep 17 00:00:00 2001 From: Oisín Mac Fhearaí Date: Thu, 29 Aug 2019 21:39:53 +0100 Subject: PR suggestions (with thanks to @fabriceleal). --- src/c/urweb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/c/urweb.c b/src/c/urweb.c index 62561828..af929269 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -2351,14 +2351,10 @@ uw_unit uw_Basis_htmlifySpecialChar_w(uw_context ctx, uw_Basis_char ch) { if(uw_Basis_isprint(ctx, ch)) { - const UChar ins[1] = { ch }; - char buf[5]; int32_t len_written = 0; UErrorCode err = U_ZERO_ERROR; - u_strToUTF8(buf, 5, &len_written, ins, 1, &err); - sprintf(ctx->page.front, "%s", buf); - // printf("buf: %s, hex: %x, len_written: %d, err: %s\n", buf, ch, len_written, u_errorName(err)); + u_strToUTF8(ctx->page.front, 5, &len_written, (const UChar*)&ch, 1, &err); len = len_written; } -- cgit v1.2.3