Gossamer Forum
Home : General : Perl Programming :

encoding problem

Quote Reply
encoding problem
i had the following code to change a displayed ampersand to a plain one for saving in text database:
Code:
$tmp =~ s/&/&/g; # 01/22/2017 w3 validation for AT&T

then i had the following code to change the ampersand to w3 validation friendly one for display after retrieving record:

Code:
$array[$i] =~ s/&/&/g;
both worked fine. but now i'm having problem with double quotes. if someone enters double quotation marks in a text field, the record is saved with the quotation mark. but if the record is modified, the form interprets the quotation mark as the end of the field value and wipes out the record. i think i solved this problem before but have accidentally lost my fix. there must be a simple way to encode everything properly.

Subject Author Views Date
Thread encoding problem delicia 1915 Aug 2, 2021, 2:13 PM
Post Re: [delicia] encoding problem
Andy 1874 Aug 3, 2021, 11:57 PM