freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Will McQueen <wmcqueen AT athenahealth.com>
- To: "freetds AT lists.ibiblio.org" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] freebcp UTF8 to UCS-2LE importing
- Date: Thu, 2 Jun 2011 09:58:53 -0400
Here's the diff I applied to the 6/1 snapshot to fix the issue I
was having loading UTF8 client data into nvarchar fields in SQL Server.
@@ -1252,8 +1249,8 @@
*/
file_len = collen;
if (bcpcol->char_conv) {
- if (bcpcol->on_server.column_size > bcpcol->column_size)
- collen = (collen * bcpcol->on_server.column_size) /
bcpcol->column_size;
+ if (bcpcol->char_conv->server_charset.max_bytes_per_char >
bcpcol->char_conv->client_charset.min_bytes_per_char)
+ collen = (collen *
bcpcol->char_conv->server_charset.max_bytes_per_char) /
bcpcol->char_conv->client_charset.min_bytes_per_char;
cd = bcpcol->char_conv->to_wire;
tdsdump_log(TDS_DBG_FUNC, "Adjusted collen is %d.\n", collen);
Let me know what you think,
Thanks,
Will
-
[freetds] freebcp UTF8 to UCS-2LE importing,
Will McQueen, 06/01/2011
- <Possible follow-up(s)>
-
Re: [freetds] freebcp UTF8 to UCS-2LE importing,
Will McQueen, 06/02/2011
- Re: [freetds] freebcp UTF8 to UCS-2LE importing, Frediano Ziglio, 06/02/2011
Archive powered by MHonArc 2.6.24.