Skip to Content.
Sympa Menu

freetds - Re: [freetds] Conversion emoji symbols to UTF-8

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <james.k.lowden AT icloud.com>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] Conversion emoji symbols to UTF-8
  • Date: Thu, 21 Apr 2016 12:29:23 -0400

On Thu, 21 Apr 2016 12:16:15 +0100
Frediano Ziglio <freddy77 AT gmail.com> 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






Archive powered by MHonArc 2.6.24.

Top of Page