Delphi XE8 Win1250 to UTF8

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alexberro
Posts: 2
Joined: Thu 20 Oct 2016 10:13

Delphi XE8 Win1250 to UTF8

Post by alexberro » Thu 20 Oct 2016 10:21

Hi guys ,
first sorry for my bad english...
I have a problem.
I have a project on delphi XE8 where i use a Unidac connection with a charset win1250.
I would to change and use UTF8 charset but when i change the fields connection my project "blow up"...
I use a firebird database...
How can i fix this problem? is there a method where the component choose which charset use?
Thanks for your help.
Regards
Alessandro Berrone

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Delphi XE8 Win1250 to UTF8

Post by ViktorV » Thu 20 Oct 2016 12:55

Please provide a more detailed and clear description of your problem: the full text of the error message, the sequence of step resulting in the error, and when it occurs: in the run time or design time etc.

alexberro
Posts: 2
Joined: Thu 20 Oct 2016 10:13

Re: Delphi XE8 Win1250 to UTF8

Post by alexberro » Thu 20 Oct 2016 13:13

I've got a form where i can insert a text in a cxDBtextedit who is connect a uniquery and a datasource.
When i run my program , if i insert a simple caracter ( a , b ,c ,d ecc ) there is no problem , instead if i insert a "à , ç " or similar particular caracter i receive an error. This is the problem because of the use of WIN1250 fields but i insert a caracter that are not supported. So , how can I use a domain utf8 without making changes to the fields, but only to the connection, changed a type database win1250 to utf8.
http://imgur.com/a/fck3i

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Delphi XE8 Win1250 to UTF8

Post by ViktorV » Mon 24 Oct 2016 10:55

The TUniConnection.SpecificOptions.Values['Charset'] option is used for charset setting, used by client. When the field charset in the table differs from the connection charset to the database, the server attempts to convert output and input data. In the case of the specified data conversion issue the error "Cannot transliterate character between character sets" appears.
To solve this issue you should change charset for the required field in the DB in UTF8.

Post Reply