Article View: borland.public.cppbuilder.internet.web
Article #792Re: utf-8 in filename of Content-Disposition: attachment;
From: Hans Galema
Date: Mon, 30 Jan 2006 20:38
Date: Mon, 30 Jan 2006 20:38
25 lines
1860 bytes
1860 bytes
Steve Aletto wrote:
> Because you need to decode UTF-8 after the base64.
> int needed = MultiByteToWideChar(CP_UTF8, 0,
> Edit2->Text.c_str(), -1, NULL, 0);
> if (needed)
> {
> WCHAR *wc = new WCHAR[needed];
> MultiByteToWideChar(CP_UTF8, 0, Edit2->Text.c_str(), -1,
> wc, needed);
> Edit2->Text = String(wc);
> delete[] wc;
> }
This works very well.
> Please notice I wrote this code only for test. It must be
> checked _very_ deeply.
I trust it blind.
Thanks so much.
Hans.
Technical Details
Message-ID:
<43de7936$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43de245b$1@newsgroups.borland.com> <43de261b@newsgroups.borland.com> <43de2bcf$1@newsgroups.borland.com> <43de312a@newsgroups.borland.com> <43de37ad$1@newsgroups.borland.com> <43de4351@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,9857a2e9199d6815 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 30 Jan 2006 21:38:44 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: utf-8 in filename of Content-Disposition: attachment; References: <43de245b$1@newsgroups.borland.com> <43de261b@newsgroups.borland.com> <43de2bcf$1@newsgroups.borland.com> <43de312a@newsgroups.borland.com> <43de37ad$1@newsgroups.borland.com> <43de4351@newsgroups.borland.com> In-Reply-To: <43de4351@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 145.98.201.248 Message-ID: <43de7936$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1138653494 145.98.201.248 (30 Jan 2006 12:38:14 -0700) Lines: 25 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail