开发者

PHP convert_uudecode function - special characters problem

I'd like to use convert_uudecode function, but encoded string contains a quotation mark ( " ) and also an apostrophe ( ' )

I can't just do it like this:

print convert_uudecode("M:'1T<#HO+V1N87=R;W0N;F%Z=V$N<&PO;&EC96YC97,O8F5S="UD96%L'0` ` ");

cos as you can see there is already a quotation mark.

I also cant do it this way:

print convert_uudecode('M:'1T<#HO+V1N87=R;W0N;F%Z=V$N<&PO;&EC96YC97,O8F5S="UD96%L'0开发者_如何学C` ` ');

becouse rendered string also contains an apostrophe.

Any help? Regards, David


Exchange each Apostrophe ' inside the string with &apos; and for each Quotation mark " you need to use &quot;

An another alternative is to replace the " with \" and ' with \'

Visit this link below:

Hexadecimal value, Entity encoding etc

http://msdn.microsoft.com/en-us/library/aa226544%28v=sql.80%29.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜