I'm having an issue with vvIn_Char. If a string has been copied and pasted into a text field in the browser from another editor (like Microsoft Word or an HTML formatted email), a single quote character comes in via vvIn_Char as unrecognizable. It looks like a square when viewed in debug and in the database. Any idea how to resolve this?
Announcement
Collapse
No announcement yet.
Problem with single quote using vvIn_Char
Collapse
X
-
MS Word and other applications use special unicode characters for certain symbols and punctuation, which often won't show as expected when stored in a standard DB2 character field. Always have to be different... :-)
Below is a listing of some of those special characters:A quick and simple way to convert those symbols is with a regex on the front-end. For example, let's say a user has copied this text from MS Word:Symbol Encoding single quotes and apostrophe \u2018\u2019\u201A double quotes \u201C\u201D\u201E ellipsis \u2026 dashes \u2013\u2014 circumflex \u02C6 open angle bracket \u2039 close angle bracket \u203A spaces \u02DC\u00A0
""
This is going into a text field with an itemId of userNotes, and the slanted single apostrophe in "We're" is going to cause problems when stored in a standard physical file's character field. Before we send the value to the back end RPG program, we'll have the front end replace the symbol for single quotes/apostrophe with a standard single quote character...
I'm having issues wrapping the code, so below is an image: SymbolReplace.png
Last edited by robert.swanson; 10-13-2017, 07:10 AM.
Comment