Skip to Content.
Sympa Menu

freetds - [freetds] no data returned when "smart quotes" present in row

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Higgins <linux AT evolone.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] no data returned when "smart quotes" present in row
  • Date: Tue, 26 Feb 2008 16:03:32 -0800

Hello, folks --

First, I'm generally a very happy user.

One glitch I've come across is the presence of "smart quotes" in my
data. Whenever a row is returned with that, my scripts come up
empty.

Here's an example:

0000000 K i d s 342 200 230 N K r i b s ,

Oddly, tsql handles it alright in its shell, where I got the hexdump
bits above, but not isql in batch or my scripts.

Here's how it looks in the isql shell: |Kids ?N Kribs,|

But in batch mode, or my scripts, it just fails to return anything.

How do I trace down this issue?

echo $LANG
en_US.UTF-8

echo $LC_ALL
en_US.UTF-8

Any helpful replies appreciated. I'd personally like to make these
erroneous characters just go away from my data, but I'm not sure how to
go about it _and_ be sure they won't just show up again. So, better to
handle. Somehow it seems clear that FreeTDS isn't at fault. Does
unixODBC use iconv, for example? I don't get an error when manually
setting isql lang by -len_US.UTF-8.

Just found this tidbit: "In what way doesn't gnome-terminal handle
smart quotes? ... a left quote is hex e2 80 98 and a right quote is
e2 80 99 That sure looks like UTF-8 to me"

What can I do to help fix this?

Cheers,

--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org




Archive powered by MHonArc 2.6.24.

Top of Page