Hello,
I compile CC from source using the following .config:
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_generic=y
CONFIG_TARGET_ar71xx_generic_GLINET=y
CONFIG_DEVEL=y
CONFIG_BUILD_NLS=y
CONFIG_SDK=y
CONFIG_PACKAGE_iconv=y
CONFIG_PACKAGE_libcharset=y
CONFIG_PACKAGE_libiconv-full=y
CONFIG_PACKAGE_libintl-full=y
CONFIG_PACKAGE_kmod-fs-nfs=y
CONFIG_PACKAGE_nfs-utils=y
Then I run the following program
#include <wchar.h>
#include <locale.h>
int main(void)
{
setlocale(LC_CTYPE, "C.UTF-8");
wprintf(L"привет мир\n");
return 0;
}
(on Debian 9 this program runs OK)
I get this output
Invalid wide format string.
Also, "locale" command does not exist.
Which config options must be set to enable uclibc locale support?
What is curious:
1) if we use "hello world" instead of "привет мир" - it works OK
2) if I use getwc() on non-ascii file (on ascii file it works OK), it fails with "getwc: Invalid or incomplete multibyte or wide character" (input is valid UTF-8 and works OK on Debian 9)
(Last edited by igor.liferenko on 15 Mar 2017, 10:12)