|
Posted by Shelly on 11/15/07 14:50
I found the mysql group on google and posted a question (which I'll attach
below). On thinking about it, it might be a php problem after all. I can
see the data properly via phpMyAdmin (an apostrophe is an apostrophe).
However, on looking at the retrieved results in php, the apostrophe takes on
an odd three character sequence. Also, in looking at the text file in
MSWord, I see apostrophes, but they look different than the apostrophe used
to delimit a field value. When I try to do a replace on the apostrophes I
want, it picks them all out to replace.
So, this might be php after all.
(Side note to Jerry: The activity in that group is about 30 posts/replies
per day, with two of them from you. Not a very active group -- but
passable).
Here is what I posted there:
************
I have to port data from MySQL 4.1.x to MySql 4.0.27 (The client is
changing hosts). Call these S for source and D for destination.
On D, if I put in data with an apostrophe (using addslashes), it goes
in fine and comes out fine. However, data from S which is now in D
via an export/import (done already, but I can redo it if needed) when
retrieved via PHP comes up with a strange sequence of βEURO(tm) instead of
an apostrophe. Also, the e with the back accent mark as in Cafι comes
out CafΓ(c),
S has a default character set of lantin1, while D has a character set
of utf8.
I have tried an "alter table foo character set latin1" on D. No
help. I have then gone and put it back to utf8. Nothing changes. I
have also tried exporting from S specifying it as utf8 and importing
it on D. No luck there either.
When I go into phpMyAdmin and look at the data, I see an apostrophe.
Short of digging through all the data and doing an update, or looking
at the export from D, massaging it, and reimporting it, I don't know
how to fix these data.
Any help is welcome.
***********
With a followup of:
**********
One more thing. When I look at the text file that was exported from
S, I see apostrophes, yet when I then import it to D and look at it I
see the junk. (I created a new table and did this for testing
purposes).
*********
--
Shelly
Navigation:
[Reply to this message]
|