wreadln: use locale_width() in byte_to_screen()
authorMax Kellermann <max@musicpd.org>
Wed, 12 Sep 2018 17:50:25 +0000 (19:50 +0200)
committerMax Kellermann <max@musicpd.org>
Wed, 12 Sep 2018 17:57:57 +0000 (19:57 +0200)
src/wreadln.cxx

index c2ceab6..3ca0978 100644 (file)
@@ -92,7 +92,7 @@ byte_to_screen(const char *data, size_t x)
        assert(x <= strlen(data));
 
        const std::string partial(data, x);
-       return utf8_width(LocaleToUtf8(partial.c_str()).c_str());
+       return locale_width(partial.c_str());
 #else
        (void)data;