Forums / General Questions / Why are some calls to htmlentities hard-coded to UTF-8?

Why are some calls to htmlentities hard-coded to UTF-8?

Views: 464

Results 1 to 2 of 2
12 Oct 2012, 12:03 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,111
Plugin Contributions:
56

Why are some calls to htmlentities hard-coded to UTF-8?

I ran a Tools->Developers Tool Kit against my v1.5.1 catalog for **htmlentities **because I couldn't remember the format. In the result, I noticed that a couple of files (see below) have the third parameter hard-coded to UTF-8 instead of using CHARSET. What's the reason for this?

/includes/functions/functions_general.php
/includes/modules/payment/linkpoint_api.php
/includes/modules/payment/paypal/paypal_functions.php
/includes/modules/payment/paypaldp.php
/includes/modules/payment/paypalwpp.php

15 Oct 2012, 12:05 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Why are some calls to htmlentities hard-coded to UTF-8?

I've not looked at the exact cases you mention, but based on the filenames, I suspect that the reason might be related to the possibility that the external services to which the data is being submitted might only accept utf8?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.