On Aug 16, 2006, at 16:52 UTC, gary hayenga wrote:

> We would like to override the databaseField.stringValue function so  
> that it always returns a string with the encoding we want.

That won't work, since (as you found) the creation of database field
(and indeed, database record) objects is not up to you.

A better bet would be to make an extension method, perhaps like

  Function UTF8String( Extends df as DatabaseField ) as String

and then use .UTF8String in your code instead of .StringValue.

> The database we are using (Frontbase) stores everything as UTF8, but
we
> want to display it as MacRoman, so we have to say theRecordSet.field 
>
(fieldName).stringValue.defineEncoding(encodings.UTF8).convertEncoding
> (encodings.MacRoman).

Note that you probably don't have to do the conversion -- if you're
displaying the string, the user can't tell whether it was drawn as
MacRoman or UTF-8.  The key thing is getting it defined correctly.

I haven't used FrontBase, but who maintains that plugin?  If it stores
everything as UTF-8, then it really ought to be defining the encoding
for you.

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