Subject isc_action_svc_add_user and Unicode
Author Borut Maricic
I apologize if this is a trivial question - I am quite a
newbie in the FB. I know that the following is for most of
the people not a very important issue, but still, I would
like to ask for a clarification... On:

one can read: "Service: isc_action_svc_add_user [...] The
information for first name, middle, and last names are
stored as Unicode FSS. If using unicode for this
information, the length will need to reflect the number of
bytes and not necessarilly the length of the string."

(Please note that the topic here is not the usual font
definition/encoding issue of the user tables, but the
encoding of the strings given/returned to/from a server

I am doing things with Delfi and have been experimenting
with Unified Interbase (UIB) components. I have changed my
local copy of them (unit jvuib), so that I am able to work
with WideString (supported through the unit TntSystem, a
part from TntWare components

I have also adapted an existing example from the UIB
distribution (Security example) in that I am now using
TTntStringGrid and TTntEdit where necessary. Basically,
everything works fine. Through the modified jvuib I am able
to read and write these three user fields (via IB service)
as UTF8-encoded strings.

The problem (and my question) is related to the following:
the decoding/encoding is going on at the client side (my
test-application) and not at the server side. Server gets,
stores and later returns just a string (which is, in my case
a UTF8-encoded string). This means that when these fields
were filled through other applications (for instance
IBConsole, IBOConsole), then I will not see these contents
correctly (in my application and TTntStringGrid!)if they
contain special characters (like öäüß), because these other
applications have not done the UTF8-encoding prior to
passing them to the IB service.

So, the question is: Who is right here? How should client
encode (if at all) the first name, middle name and the last
name strings before passing them to the appropriate server
service? Who is responsible for the encoding? Is it not that
this area is fundamentally not properly defined? If the
server is responsible for the encoding, then it should
always receive the info as WideString (or with an explicit
info about the encoding of the string), otherwise it can
never be able to encode it properly.

Any suggestions over this matter are welcome! I know that it
is not an important matter, but I just got very curious and
would really appreciate your ideas. I once more apologize if
I got the issue completely wrong. Thanks.