views:

113

answers:

1

hi all

in my application ,i am sending data from my application to database i am getting some odd characters in my database like this

alt text

i am sending my data like this

var
 w:widestring;
 u:utf8string;
begin
   w:=data //data is function to get some info(string)
   u:=utf8encode(w);
   sendfn(u);
end;

i am using utf8_decode(my get data) in my php code before adding to my database.

and my database and tables collation is utf8_general_ci

can anyone help me in this issue

A: 

It's an educated guess, but does the Data function return an UTF-8 string instead of a WideString? I think the error could be in this Data function that you're calling, which returns the data in the wrong string format.

Workshop Alex
function doesnt return any string ,it is used write data .see 3rd comment in first post
steve0