diff --git a/utf8.c b/utf8.c index 7dd75d57..bc7c8fd2 100644 --- a/utf8.c +++ b/utf8.c @@ -24,6 +24,7 @@ #include #include +#include "compat.h" #include "tmux.h" static const wchar_t utf8_force_wide[] = { @@ -455,7 +456,11 @@ utf8_fromwc(wchar_t wc, struct utf8_data *ud) { int size, width; +#ifdef HAVE_UTF8PROC + size = utf8proc_wctomb(ud->data, wc); +#else size = wctomb(ud->data, wc); +#endif if (size < 0) { log_debug("UTF-8 %d, wctomb() %d", wc, errno); wctomb(NULL, 0);