Unicode with Delphi 6
Unicode with Delphi 6
Hi
i 'm looking in the forum for an answer but cannot find one
my probelm is, i see my unicode text in the database (mysdql 4..) but i can 't read (select) them , i always see only '???????????'
to insert the unicode text i use params.
I use the latest build of mydac.
her some code:
login options:
LoginPrompt := false;
Server := pm_Server;
Database := pm_DB;
Password := aPasswort;
Username := aUser;
Port := 3306;
Connected:=TRUE;
Options.UseUnicode := True;
database:
CREATE TABLE `example` (
`Id` int(11) NOT NULL auto_increment,
`BEZ` text,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
`BEZ` is the field for the unicode text
Thank you in advance and
best regards
struppy
i 'm looking in the forum for an answer but cannot find one
my probelm is, i see my unicode text in the database (mysdql 4..) but i can 't read (select) them , i always see only '???????????'
to insert the unicode text i use params.
I use the latest build of mydac.
her some code:
login options:
LoginPrompt := false;
Server := pm_Server;
Database := pm_DB;
Password := aPasswort;
Username := aUser;
Port := 3306;
Connected:=TRUE;
Options.UseUnicode := True;
database:
CREATE TABLE `example` (
`Id` int(11) NOT NULL auto_increment,
`BEZ` text,
PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
`BEZ` is the field for the unicode text
Thank you in advance and
best regards
struppy
Try to use
Code: Select all
Assert(Query.FieldByName('BEZ') is TWideStringField);
Bez := TWideStringField(Query.FieldByName('BEZ')).Value;
-
- Posts: 20
- Joined: Fri 30 Sep 2005 14:13