For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > February 2007 > Need help storing special characters like ° (degrees)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Need help storing special characters like ° (degrees)
Pugi!

2007-02-19, 9:57 pm

Whenever I insert a geographical coordinate in database or even in
textfile after submit, for example 15=B016'18''
it ends op like 15=C2=B016'18''. =E9, =E0, =E7, =E8, ... ends up funny too.=
It
shows ok when displayed on webpage. But it is hardly readable in
database or in textfile.
I've created 3 different tables with 3 different collations
(utf8_unicode_ci, latin1_bin, latin_swedish_ci) each with 3 fields
(varchar with the 3 different collations) 9 posibilities. All with the
same result. When I input via phpMyAdmin it works fine: I see
15=B016'18'' in all the tables and all the columns. So it must be
somthing I do or don't do when submitting the information. When I
ouput the contents of the $_POST to a textfield it also shows 15=C2
=B016'18'' on linux (cli) en wordpad on windows. Shows ok in notepad.
I've tried changing the http-equiv=3D"Content-Type", using
stripslashes(strip_tags(trim(urldecode(o
n the post-variables))))
Problem is I have to do test on the contents of the fields (once they
are in database) so for example for geographical coordinates I want to
find '=B0' and not '=C2=B0'.

Help,

Pugi!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com