cei has asked for the wisdom of the Perl Monks concerning the following question:
The problem is, the main site administrator tends to write her content in MS Word first, then copies and pastes it into my form. Word does all sorts of fun character substitutions, such as curly-quotes, turning -- into an em-dash, changing ... into a single elipses character, etc. I suspect that some of these characters sometimes either break coming into the database (being stored as type blob) or break within the quotes of the document.write in the .js files I'm generating. (I'm escaping regular single and double quotes before puting them into the document.write).
My question is, how does Perl identify these special characters? They're not 7-bit ASCII. Should I use ord on a test sample, then work out a sustitution table on my own? Or is there a module that already handles this for me? (charnames?)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Special Character Substitutions
by Fletch (Bishop) on Oct 04, 2001 at 04:33 UTC | |
|
Re: Special Character Substitutions
by boo_radley (Parson) on Oct 04, 2001 at 05:38 UTC |