PDA

View Full Version : Problem with Shipping Methods & Rules and PHP


pcsol
June 23rd, 2005, 05:39 AM
Hi all... I know I can't be the only one that had this problem, so I would like to post the issue and solution...

I have been having a terrible time creating Shipping Rules using any of the UPS methods that have the ® symbol next to them. When I tried to select one of these options, the 'Shipping Method' field would always be left blank. Apparently PHP v4.x (and probably 5.x) does not seem to parse symbols like it used to in 3.x. I do believe this is a problem with PHP, but someone correct me if I'm wrong. On all of my sites I have on my server, all of the direct symbols (such as bullets •, copyright ©, registered ® ) show up as a question mark (?). Like I said, I believe this to be a PHP issue.

This relates to Squirrelcart and the problem I had because the UPS 2nd Day, UPS Next Day, and the rest of the UPS methods that have a ® symbol actually have the direct &reg symbol in the SQL tables. I went through the tables that had the ® symbol and replaced them with the actual HTML code & reg; (no space between the & and reg). I then went back to the Shipping Rules and now the Shipping Method field is populated correctly.

As far as I know it is proper to use the HTML & Code or # to create these symbols instead of pasting the actual symbol into your pages. Any comments about this or the Squirrelcart problem (which I have now resolved)? Or does someone know what the problem could be on my server?

AJ

Kruunch
July 24th, 2005, 08:38 PM
The issue is more likely that you are running UTF-8 encoding on your server(s) which doesn't parse those symbols (hence the ?s you've been getting).

But you're correct in that all databased characters should be placed in ASCII code. The developers might have been running ISO encoding (which does parse those characters) and didn't catch that.

pcsol
July 25th, 2005, 11:41 AM
The issue is more likely that you are running UTF-8 encoding on your server(s) which doesn't parse those symbols (hence the ?s you've been getting).

But you're correct in that all databased characters should be placed in ASCII code. The developers might have been running ISO encoding (which does parse those characters) and didn't catch that.

Thanks Kruunch. Just checked out how to get the correct encoding to work on my server, and everything looks good again!

Kruunch
July 25th, 2005, 04:49 PM
Cool glad I could help (at least with that)! :)