curl-users
Re: Unicode characters not shown correctly
Date: Sat, 11 Aug 2012 00:35:03 +0200
On Fri, Aug 10, 2012 at 10:46:43AM -0700, Zayl Linel wrote:
> Hi, I am making a c program that supports many languages. The program send
> emails using the type WCHAR instead of char. The problem is that when I receive
> the email and read it, some characters are not shown correctly even some
> english ones like e,m, ... This is an example :
>
> curl_easy_setopt(hnd, CURLOPT_READFUNCTION, payload_source);
> curl_easy_setopt(hnd, CURLOPT_READDATA, &upload_ctx);
>
> static const WCHAR *payload_text[]={
> L"To: <me_at_mail.com>\n",
> L"From: <me_at_mail.com>(Example User)\n",
> L"Subject: Hello!\n",
> L"\n",
> L"Message sent\n",
> NULL
> };
RFC5322 doesn't support UNICODE. Read the RFC (and the MIME ones) to
find out how to properly format a message. In short: WCHAR isn't going
to work.
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-08-11