You are here: Re: Need help storing special characters like ° (degrees) « PHP SQL « IT news, forums, messages
Re: Need help storing special characters like ° (degrees)

Posted by Captain Paralytic on 02/19/07 14:46

On 19 Feb, 14:37, "Pugi!" <pugin...@gmail.com> wrote:
> Whenever I insert a geographical coordinate in database or even in
> textfile after submit, for example 15°16'18''
> it ends op like 15°16'18''. é, à, ç, è, ... 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°16'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Â
> °16'18'' on linux (cli) en wordpad on windows. Shows ok in notepad.
> I've tried changing the http-equiv="Content-Type", using
> stripslashes(strip_tags(trim(urldecode(on 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 '°' and not '°'.
>
> Help,
>
> Pugi!

Whilst not exactly an answer to your original question, might I
suggest that you shouldn't be storing the symbols in the first place.
A coordinate is a value. You should store them as values and then
apply formatting for display.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация