Article View: borland.public.cppbuilder.nativeapi
Article #5499Re: How to get Unicode text in a rich text control as 8 bit text.
From: Gary Setter
Date: Wed, 10 Aug 2005 16:39
Date: Wed, 10 Aug 2005 16:39
31 lines
2290 bytes
2290 bytes
"Gary Setter" <setterg@worldnet.att.net> wrote in message news:42f9580f@newsgroups.borland.com... > Hi, > I want to get the Unicode text of a rich edit control as 8 bit characters. I > want the Unicode characters converted to 8 bit as if by WideCharToMultiByt > where the code page is as defined by the RTF control word \ansicpg . > Currently, when I get the text the non-ASCII characters are translated to > 0x3F ? > I tried using the GetWindowText() function and the EM_GETTEXTRANGE message. > Is there any way I can do this? > Thanks, > Gary > Hi, Some more information. I running Windows 98 and Rich Edit control version 3.0. What I think is happening is while that version of the control supports Unicode characters, they expect any application that use Unicode characters that are not 7 bit ascii, to be Unicode applications. Sadly, my Win98 does not run Unicode applications. It seems like a fairly simple thing to support. Define a new message like EM_GETTEXTRANGE (which has an unused wParam) that specifies a characterset and character range and returns the text as 8 bit. If I'm right, please post. Then I can blame Microsoft. If I'm wrong, please post and explain how I'm wrong.
Technical Details
Message-ID:
<42fa2e00@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42f9580f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ae6457c103542367 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Gary Setter" <setterg@worldnet.att.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <42f9580f@newsgroups.borland.com> Subject: Re: How to get Unicode text in a rich text control as 8 bit text. Date: Wed, 10 Aug 2005 11:39:54 -0500 Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 12.74.20.107 Message-ID: <42fa2e00@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1123692032 12.74.20.107 (10 Aug 2005 09:40:32 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!news.moat.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail