|
From: Eli Z. <el...@gn...> - 2016-09-07 17:43:13
|
--text follows this line--
> Date: Wed, 7 Sep 2016 17:07:27 +0000 (UTC)
> From: Hisham Sueyllam <sue...@ya...>
>
> I tried both Suggestions [the one from Wu and this one suggested by Eli]. Nothing worked at least for Arabic,
> including piping through perl. By redirecting the Arabic output to a file I can open it and see it correct using any
> editor [I used emacs], but when piping through perl I get garbage or using puts or putchar or whatever. I have
> Windows 10 64-bit and gcc 5.3.0 (the latest)
> By the way if anyone is curious, the Arabic string is my first name:
>
> #include <stdio.h>
>
> int main() {
> puts(u8"هشام\n");
> return 0;
> }
Your email is encoded in UTF-8, and you use Emacs, so I strongly
suspect the Arabic string in your source file was also encoded in
UTF-8. That will never work; you need to encode it in your system's
ANSI codepage, I think. Windows includes only a very sporadic support
for UTF-8, and in particular cannot use it in multibyte strings.
|