On Sep 01, 2006, at 09:24 UTC, RBNUBE wrote:

> You might try:
> 
>   Dim c as TextConverter
>   c=GetTextConverter(GetTextEncoding(&h0201), GetTextEncoding(0))
>   EditField1.text=c.convert(EditField1.text)

I wouldn't.  First, there is almost never any reason to use a
TextConverter object these days; ConvertEncoding does the same thing,
and often more quickly.  Second, I can't imagine why you would want to
convert to encoding 0.

Third, and most important, it never makes sense to convert the contents
of an EditField like this.  An EditField's content (i.e.
EditField.text) is built from the internal representation of the text;
this is a true text representation, not just a bunch of bytes.  If
you've stuffed garbage (i.e. a string with an incorrectly defined
encoding) into an EditField, what you get out will be different
garbage, and fixing that will be pretty much impossible.  Conversely,
if you haven't stuffed garbage into the EditField to begin with, then
there would (in this situation) be no need to convert it.  Finally, if
you did have a need to convert it, there would be no point in stuffing
it back into the EditField, since the EditField is simply going to
convert it back into its own internal text representation anyway.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to