freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] freebcp UTF8 to UCS-2LE importing
- Date: Thu, 2 Jun 2011 21:23:41 +0200
Apart for a small rounding problem... committed to both 0.91 and CVS HEAD!
bye
freddy77
2011/6/2 Will McQueen <wmcqueen AT athenahealth.com>:
> 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 mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
-
[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.