Recent

Author Topic: (SOLVED) Lazarus - SQL Server data are in Greek characters not unicode  (Read 2955 times)

dbots

  • Newbie
  • Posts: 6
Hi guys,
I use Lazarus 1.6 to connect to SQL Server 2014 using ODBC connection (FileDSN), on Windows 7.
Connection is fine, everything is OK except one problem :
The data in SQL server have been saved in Greek characters (Windows 1253 or ISO-8859-7), not Unicode.
So, when I get the data on a StringGrid (I use ODBCConnection and SQLQuery components to do the job), in the fields that containt Greek characters, I see ????. I used function AnsiToUTF8 or UTF8Encode just in case it could transform the characters but the result was negative.
Could you please give some help on how to solve this ?
Thank you.
« Last Edit: January 24, 2017, 07:49:48 pm by dbots »

paweld

  • Hero Member
  • *****
  • Posts: 970
Re: Lazarus - SQL Server data are in Greek characters not unicode
« Reply #1 on: January 24, 2017, 07:44:58 pm »
add to uses LConvEncoding unti, and use CP1253ToUTF8 function
Best regards / Pozdrawiam
paweld

dbots

  • Newbie
  • Posts: 6
Re: Lazarus - SQL Server data are in Greek characters not unicode
« Reply #2 on: January 24, 2017, 07:48:56 pm »
add to uses LConvEncoding unti, and use CP1253ToUTF8 function
Thank you paweld ! That's what I was looking for !

 

TinyPortal © 2005-2018