Monty,
It appears Yahoo Mail and/or Firefox 3 truncated my earlier
message. Here is what I sent.
Regards,
Joel
--- On Sat, 7/19/08, Joel Kallman <joel_kallman yahoo.com> wrote:
To: ODTUG-WEBDEV-L fatcity.com
Date: Saturday, July 19, 2008, 10:28 AM
Hi Monty,
This is a great question and a problem I've encountered
before.
I have found the majority of "odd" characters when
people copy and paste from MS Word are the double-quotes.
These aren't your ordinary double-quotes - they are LEFT
DOUBLE QUOTATION MARK (Unicode 0x201c) and RIGHT DOUBLE
QUOTATION MARK (Unicode 0x201d).
These characters can be represented by code points in some
database character sets (AL32UTF8, WE8MSWIN1252) but not in
others (US7ASCII, WE8ISO8859P1).
I was smoked by this years ago when we had a documentation
writer prepare some help text for us. She used MS Word 2000
to author the help text and then she would copy and paste it
into our Web interface. This created issues for us when we
would export and import the data. We finally figured out it
was primarily due to these quotes from MS Word. We wrote a
function specifically for her - to scrub the data that she
would be pasting in, and would inevitably include these
oddball characters. Her name was Sheryl, we wrote a
function called 'sheryl_scrub', and 8 years ago, we still
refer to this problem as needing the 'sheryl_scrub'
function.
Back then, the Oracle database didn't have any regular
expression functions, so we had to do this in a brute force
manner. But we were primarily looking for these quotation
characters. Today, the Oracle database has REGEXP_REPLACE.
Off the top of my head, you *may* be able to get by with
something like:
regexp_replace(p_value, '[^[:print:]]')
Good luck.
Regards,
Joel
--
For more information on this topic or to become a member,
visit our Web site at http://www.ODTUG.com
Join ODTUG for The PL/SQL and The APEX Expert Gathering of
the Year! OPP2008 and APEXposed! 2008 will be held on
October 29-30, 2008 at the Wyndham O'Hare, Chicago. Visit
www.odtugopp.com or www.odtugapextraining.com for more
details.
--
Author: Joel Kallman
INET: joel_kallman yahoo.com
Fat City Hosting, San Diego, California -- http://www.fatcity.com
------------------------------------------------------------
---------
To REMOVE yourself from this mailing list, send an E-Mail
message
to: ListGuru fatcity.com (note EXACT spelling of 'ListGuru') and
in
the message BODY, include a line containing: UNSUB
ODTUG-WEBDEV-L
(or the name of mailing list you want to be removed from).
You may
also send the HELP command for other information (like
subscribing).
|