File enconding ISO-8859-1 dosent works [help me]

15 views
Skip to first unread message

fabiano....@zanthus.com.br

unread,
Aug 25, 2016, 3:01:52 PM8/25/16
to android-ndk
My files are enconding ISO-8859-1, I am using locale to set the extended ASCII but the output was wrong
This only works if my files are enconding UTF-8

It is a NDK bug?
how can I solve this without change file encoding

thanks


char buffer[80];
int vspfunc(char *format, ...)
{
   va_list aptr;
   int ret;

   va_start(aptr, format);
   ret = vsprintf(buffer, format, aptr);
   va_end(aptr);

   return(ret);
}

JNIEXPORT jint Java_com_example_zanthus_fn2_MainActivity_callPDV( JNIEnv* env, jobject obj, jobjectArray jargv )
{
printf("Localidade corrente: %s\n", setlocale(LC_ALL,"no_NO.ISO8859-1"));
printf("no_NO.ISO8859-1------------------");
printf("aki [%s]0","ãããããã");
vspfunc("%d %s, ééé", 50, str);
printf("%s\n", buffer);
printf("Númeroooooooooooooo [%d]0", 55);
printf("testeeeeeee  ãããããã [%s]0","XX");
printf("-------------------------");
}



output:

Localidade corrente: no_NO.ISO8859-1
no_NO.ISO8859-1------------------
aki [������]0
50 ol�, ���
N
testeeeeeee  
-------------------------

Reply all
Reply to author
Forward
0 new messages