NYCPHP Meetup

NYPHP.org

[nycphp-talk] Converting the pesky MS Word quotes and other characters

Hans Zaunere lists at zaunere.com
Wed Oct 29 17:00:26 EDT 2008


 
> // convert smart quotes and mdashes
> $wordchars=array('—','"','"',''',''',"…");

I've ran into strange and subtle issues when actually putting the chars to replace themselves into code.  This is especially frustrating with encoding/etc of various files, in which cases sometimes these won't match correctly.  Thus, the chr(0x96) usage, which is more explicit.

H





More information about the talk mailing list