Skip to Content.
Sympa Menu

freetds - Re: [freetds] UTF-8 issue

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Igor Korot <ikorot01 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] UTF-8 issue
  • Date: Mon, 7 Jan 2019 19:53:34 -0600

Hi,

On Tue, Jan 8, 2019 at 1:06 AM Deepa Umesh <Deepa.Umesh AT aptean.com> wrote:
>
> Hi ,
>
> I am trying to rephrase my question with more clarity,
>
> We are using UTF-8 as encoding in our product, which uses single byte of
> character data,
> But when we attempt to use non US ASCII UTF-8 charecters , we are having
> encoding problems similar to the following,
>
> Insert query : insert into altitem values ('あなたの犬を散歩したいと思います');
>
> When I retrieved the data using ,
> SQlExecDirect('Select * from altitem)
> , I got an error similar to ,

As Frediano suggested, try SQLExecDirectW().

Thank you.

>
> SQLCODE: 0. SQL state: 42000. Native error: 2403.
> [FreeTDS][SQL Server]Some character(s) could not be converted into client's
> character set. Unconverted bytes were changed to question marks ('?')
>
> How to deal with UTF-8 non US ASCII values in ODBC APIs , and how FreeTDS
> supports the encoding ?'
>
> Thanks in advance,
> Deepa
>
> -----Original Message-----
> From: FreeTDS <freetds-bounces AT lists.ibiblio.org> On Behalf Of Frediano
> Ziglio
> Sent: Friday, January 4, 2019 2:46 PM
> To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
> Subject: Re: [freetds] UTF-8 issue
>
> Il giorno mer 2 gen 2019 alle ore 06:14 Deepa Umesh
> <Deepa.Umesh AT aptean.com> ha scritto:
> >
> > Hi Guys,
> >
> > While using FreeTDS I found there is an inconsistency in UTF-8 issue.
> >
> > Request anyone in the mailchain to provide information on how UTF-8
> > encoding is supported.
> >
> > The following is the configuration we made in odbc.ini
> >
> > [sqlprog1]
> > Driver=/usr/local/freetds-1.00.97/lib/libtdsodbc.so
> > Server=172.16.127.134
> > Database=sqlprog1_catdev19
> > Port=1433
> > TDS_Version=7.3
> > Client Charset = UTF-8.
> >
> > My question is can we set Client Charset = UCS-2 ?
>
> No, that encoding is for multibyte, to use wide character use wide version
> of the functions.
>
> Frediano
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds
> This message contains information that is confidential and/or may be
> privileged. If you are not the intended recipient, you are hereby notified
> that any use, dissemination, distribution or copy of this message and/or
> its attachments is strictly prohibited. If you have received this message
> in error, please advise the sender immediately by replying to this email
> and delete this message. We are committed to your privacy. For more
> information, please see our Privacy Policy at
> http://www.aptean.com/privacy-statement
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page