Subject Re: [IBO] UTF-8 handling
Author Stefan Heymann
> I can understand your reasoning. However, please consider that all
> of the native IBO controls expect the string data to be
> transliterated into the local characterset because they do not
> inherantly know how to deal with UTF-8 directly. Thus, by default, I
> do the transliteration to the local character set.

OK, now I understand *your* point. However, I don't work with
databound controls (other than Grids, but there I don't use IboGrid
for several reasons, which are unimportant for this discussion).

> I believe we are both correct

Yes :-)

> and we just need to make IBO work for both of our interests.

That would be great!

> I could create a little piece of code that checks the CharSet
> property when a connection is made and look for a _RAW suffix (e.g.
> UTF-8_RAW) and remove the _RAW when passing it to the server but
> making it so that IBO didn't do any default transliteration. Thus,
> you would get the raw UTF-8 character data in the AsString property.

> Any other ideas?

That wouldn't be self-describing. One would need to know (from
documentation or whatever) that there is such a thing as the _RAW

What about an additional property like
TransliterateToLocalCharset : boolean
that defaults to TRUE?
(OK, I agree, the name could be shorter ;-)

I think this would probably be better than Martijn's suggestion of an
event that would allow me to override the default transliteration with
my own (which would then be a straight assignment). That would
probably eat a lot of processor cycles for large amounts of strings -
every single string would have to go through this event routine. And
you would need two of them: one for each direction.

Best Regards