Re: Odd encoding issue with UTF-8 + gettext yields ? on non-ASCII
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Aug 28, 2010, 21:59 UTC
- Message-ID
- <20100828215956.GB5515@burratino>
- In-Reply-To
- <20100828214641.GA5515@burratino>
Jonathan Nieder wrote:
> printf("%s\n", some_nonsense_string);
>
> should always just work.Ok, so apparently
#include <stdio.h> #include <locale.h>
int main(void)
{
setlocale(LC_CTYPE, "");
printf("%.11s\n", "Author: \277");
return 0;
}does not work. Even while
printf("%.1s\n", "étale");does print only one byte.
Ideas?