Re: Conversion emoji symbols to UTF-8

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Thu, 21 Apr 2016 12:16:15 +0100
Frediano Ziglio <[email protected]> wrote:

> This means that when you have a UTF-8 client which wants to insert an
> euro symbol the euro symbol you could have a failure or the symbol
> inserted as '?' or just skipped.

Hmm, in db-lib at least it was the case that encoding errors were
handled differently depending on direction.  (Since I doubt that's
changed, I switch to present tense.)  

If the data cannot be represented in the client's encoding, a '?' is
substituted and the error handler called with warning severity.   The
function returns successfully.  

Sending data to the server, if the data cannot be converted to the
server's encoding, no substitution occurs.  No data are sent.  The
error handler is called and the function returns an error.  

The rationale IMO is that the library cannot corrupt the data en route
to the server; whatever the server receives it must assume is what the
client intended.  OTOH when the client receives server data and cannot
render them in its character set, the user may still be able to
interpret the results and act on the warning.  

--jkl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.