Reply to Re: [PHP] Special HTML characters question.

Your name:

Reply:


Posted by Jay Paulson on 08/22/05 17:10

> by the way, you probably don't want to do the conversion *inbound* to
> the database. rather, store the original and do the conversion outbound
> - specific and appropriate for the output display.
>
> if you do it inbound you'll have the html encodings (rather than the
> actual ("special") characters) stored in your database. then, if you
> have need to do output as say plain text (as opposed to html) you'll
> have to unconvert the encodings.

Totally understand this and agree with you 100% However,

> what you may want to do inbound is to convert os/application-specific
> characters, e.g., smart quotes, to more standard representations.

wouldn't this be a headache? Considering I don't know what OS my users
are going to be using?

Ack! I hate dilemmas. :)

Thanks for the reply!

>
>
> ------------ Original Message ------------
>> Date: Monday, August 22, 2005 08:42:14 AM -0500
>> From: Jay Blanchard <jay.blanchard@niicommunications.com>
>> To: Jay Paulson <jpaulson@sedl.org>, php-general@lists.php.net
>> Subject: RE: [PHP] Special HTML characters question.
>>
>> [snip]
>> I have a problem that I'm sure some of you have run into before,
>> therefore I hope you all know of an easy solution. Some of my users
>> are cutting and pasting text from Word into text fields that are being
>> saved into a database then from that database being displayed on a web
>> page. The problem occurs when some special characters are being used.
>> Double quotes, single quotes, and other characters like accents etc
>> have the special html code like &quote; etc replacing the special
>> characters. What methods are being used to combat this issue? Is
>> there a solution out there to run text through some sort of filter
>> before submitting it to the database to look for these special
>> characters and then replacing them?
>> [/snip]
>>
>> Start here http://www.php.net/htmlentities . You can also use any
>> number of REGEX functions for replacing them http://www.php.net/regex
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>

[Back to original 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

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