Re: Escape sequences on output data

Frediano Ziglio <[email protected]> Tue, 20 Mar 2018 09:50:06 +0000
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4cmn-MNxeov0JALK4Jsvgvp51D4N5dLNOaRhYXwnF7ZZw@mail.gmail.com>
2018-03-08 12:14 GMT+00:00 Desmond Coertzen <[email protected]>:
> Hi there,
>
> I use freetds heavily to cart data backwards and forwards between mssql
> systems and linux based systems. I have encountered a problem with mssql
> character fields that contain control characters like tabs, CR, LF etc.
> TSQL outputs these in raw format always. Is there -o options available
> where escape sequences can be turned on or off?
>

No, there's no option, column data are just printed.
Currently you can use complicated terminators.
Or propose an option/patch.

> I have gone far with replace and quotename functions built into the
> queries, but it convoluted my scripts.I was hoping freetds has a built-in /
> native solution to enable/disable escaping at will.
>
> Thanks.

Frediano