Article View: borland.public.cppbuilder.nativeapi
Article #11723Re: how can use ascii dos charset in memo control?
From: Thomas Maeder [TeamB]
Date: Tue, 20 Jan 2004 21:20
Date: Tue, 20 Jan 2004 21:20
20 lines
2120 bytes
2120 bytes
"ScOe" <cbinders@hotmail.com> writes: >> You'll have to do a mapping from the encoding of the file to the encoding >> your program is using. > > How do i do that ? That depends on these encodings. You wrote that the encoding to be converted from is "dos with ascii charset". What does that mean exactly? ASCII only consists of 7bit characters. Is every char in that file <128, or is the encoding some generalization of ASCII? The encoding your Windows program is using is probably ISO-8859-1. If the file contains pure ASCII characters (all codes<128), then there's nothing to be done; the encoding of these characters is equal in ASCII and ISO-8859-1. If not, you'll have to map these characters to ISO-8859-1. A lookup table is probably the simplest way to do this, unless you are lucky and the Windows SDK offers a function that does the conversion for you, as has been sugggested in this thread already.
Technical Details
Message-ID:
<m2wu7mgvvc.fsf@madbox2.local>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<400b17b7@newsgroups.borland.com> <vram00dvjm1cn0bpddhafucohai2hd1dsg@4ax.com> <400bdd21@newsgroups.borland.com> <m2vfn7n9or.fsf@madbox2.local> <400d75ca@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2a43cf053fcca89 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-20 13:28:08 PST Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: how can use ascii dos charset in memo control? References: <400b17b7@newsgroups.borland.com> <vram00dvjm1cn0bpddhafucohai2hd1dsg@4ax.com> <400bdd21@newsgroups.borland.com> <m2vfn7n9or.fsf@madbox2.local> <400d75ca@newsgroups.borland.com> From: maeder@glue.ch (Thomas Maeder [TeamB]) Organization: TeamB Date: Tue, 20 Jan 2004 22:20:39 +0100 Message-ID: <m2wu7mgvvc.fsf@madbox2.local> User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) Cancel-Lock: sha1:niCXk5VmJv5ym1S+U41U8adbuqU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 80.218.8.157 X-Trace: newsgroups.borland.com 1074633653 80.218.8.157 (20 Jan 2004 13:20:53 -0700) Lines: 20 X-Authenticated-User: tmaeder Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail