I have found the solution! Thanks to DrByte's suggestion, I actually added to the original code:
Code:
$methods = array();
for ($i = 0; $i < sizeof($canadapostQuote); $i ++) {
list ($type, $cost) = each($canadapostQuote[$i]);
$type = html_entity_decode($type);
if ($this->cp_online_handling == true) {
if ($method == '' || $method == $type) {
And added the following:
Code:
$methods = array();
for ($i = 0; $i < sizeof($canadapostQuote); $i ++) {
list ($type, $cost) = each($canadapostQuote[$i]);
$type = utf8_encode(html_entity_decode($type));
if ($this->cp_online_handling == true) {
if ($method == '' || $method == $type) {
This fixes permanently the problem. I guess that Canada Post XML does not return UTF-8 encoded results. This FORCES UTF-8 on the results.
Hope this fix is IMPLEMENTED in the CANADA POST module and helps others cursed with the many accent problems. Thanks DrByte!
Bookmarks