Québec turns into Que�bec

General ShopSite user discussion

Québec turns into Que�bec

Postby dgray » Mon Jan 14, 2013 6:05 am

With Shopsite Pro 11 r1, I just got an order which includes Que�bec as part of the address entered by the customer. I am assuming the customer typed Québec, although I don't know that. The customer also appears to be using a Mac.

I see the string Que�bec when I click on "View orders" in the Shopsite dashboard, using Firefox 18 or Internet Explorer 10 on Windows 8. If I click on "View source" in Firefox, I see Qu�bec, so it seems something mis-decoded the original é and converted it to the UTF-8 replacement character, which is used when an invalid codepoint is found.

I notice on the checkout page that charset=ISO-8859-1 is specified in the header. Maybe this would be better as UTF-8?

~ David
dgray
 
Posts: 54
Joined: Fri Sep 08, 2006 9:06 am

Re: Québec turns into Que�bec

Postby dgray » Mon Jan 14, 2013 6:40 am

The ISO-8859-1 encoding on the checkout page does look like the problem. I see that Macs use a "Mac Roman" character encoding where é has a decimal code of 142. So if a Mac user types é on a page encoded as ISO 8859-1, there is no character defined with decimal code 142 in ISO 8859-1, so in a conversion to UTF-8, it will be invalid, hence the replacement character.
dgray
 
Posts: 54
Joined: Fri Sep 08, 2006 9:06 am

Re: Québec turns into Que�bec

Postby Jim » Mon Jan 14, 2013 8:07 am

You could modify the template to make the page UTF8 but since the backoffice of ShopSite uses the ISO 8859-1 the UTF8 in the order may not look correct on screens in the backoffice.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Québec turns into Que�bec

Postby dgray » Mon Jan 14, 2013 11:16 am

Thanks for the reply Jim.
dgray
 
Posts: 54
Joined: Fri Sep 08, 2006 9:06 am


Return to User Forum

Who is online

Users browsing this forum: No registered users and 93 guests

cron