Re: Odd encoding issue with UTF-8 + gettext yields ? on non-ASCII
- From
Marcin Cieslak <saper@saper.info>
- Date
- Aug 28, 2010, 22:14 UTC
- Message-ID
- <alpine.BSF.2.00.1008282213420.67930@x.fncre.vasb>
- In-Reply-To
- <20100828215956.GB5515@burratino>
On Sat, 28 Aug 2010, Jonathan Nieder wrote:
Show 17 quoted lines
> 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;
> }On my FreeBSD box (various locales tested) I get the following bytes output:
41 75 74 68 6f 72 3a 20 bf 0a
> does not work.
What's wrong?
--Marcin