From ed217b7b287013c56e3767b1d8e55c468277ab2e Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 27 Jan 2017 22:16:59 +0100 Subject: [PATCH] Add some docs about FreeTDS and encoding. It turns out that it's possible and not too complex, when using the FreeTDS driver, to enforce the client encoding for MS SQL to be utf-8. Document how to tweak ~/.freetds.conf to that end. --- pgloader.1 | 15 +++++++++++++++ pgloader.1.md | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/pgloader.1 b/pgloader.1 index a998a25..f45451a 100644 --- a/pgloader.1 +++ b/pgloader.1 @@ -2805,6 +2805,21 @@ The matching is done in pgloader itself, with a Common Lisp regular expression l . .IP "" 0 . +.SS "Driver setup and encoding" +pgloader is using the \fBFreeTDS\fR driver, and internally expects the data to be sent in utf\-8\. To achieve that, you can configure the FreeTDS driver with those defaults, in the file \fB~/\.freetds\.conf\fR: +. +.IP "" 4 +. +.nf + +[global] + tds version = 7\.4 + client charset = UTF\-8 +. +.fi +. +.IP "" 0 +. .SS "DEFAULT MS SQL CASTING RULES" When migrating from MS SQL the following Casting Rules are provided: . diff --git a/pgloader.1.md b/pgloader.1.md index 136c3a7..80d7bc3 100644 --- a/pgloader.1.md +++ b/pgloader.1.md @@ -2303,6 +2303,16 @@ The `mssql` command accepts the following clauses and options: expression lib, so doesn't depend on the *LIKE* implementation of MS SQL, nor on the lack of support for regular expressions in the engine. +### Driver setup and encoding + +pgloader is using the `FreeTDS` driver, and internally expects the data to +be sent in utf-8. To achieve that, you can configure the FreeTDS driver with +those defaults, in the file `~/.freetds.conf`: + + [global] + tds version = 7.4 + client charset = UTF-8 + ### DEFAULT MS SQL CASTING RULES When migrating from MS SQL the following Casting Rules are provided: