2 replies [Last post]
Hobokoto's picture
Offline
Joined: 04/28/2010
Juice: 101
Was this information Helpful?

Hello!

I am using accents in the title of a product, like so:
"Info-impôts Offre groupée d'outils"

When I order it through Paypal, I see the following in my Paypal email:
Total amount: $2.54 CAD
Currency: Canadian Dollars
Transaction ID: XXXXXXXXXXXXXXXXXXXXXX
Quantity: 1
Item/Product Name: 1× Info-impôts – Offre groupée d’out

The product title gets all screwy.

I cannot seem to find much information on this, on these forums or in Google.

Any comments on this?
Any possible solutions?

Hobokoto's picture
Offline
Joined: 04/28/2010
Juice: 101
Re: Paypal & accents in product name

Okay, with some more investigation:
Between Drupal, Ubercart and Paypal, all systems seem to be using UTF-8 as a standard.

Looking at the customers' original problem email, the source code shows a different text encoding. So it may simply be an email client issue, where the email software they're using can't deal with UTF-8 or is setup to not use UTF-8 by default.

I'll double check this.

Hobokoto's picture
Offline
Joined: 04/28/2010
Juice: 101
Re: Paypal & accents in product name

As a half-solution I ended up modifying the Paypal module.

Instead of just feeding in the items in the Paypal variable 'DESC', I also appended the site name and order #.

So instead of this in the Paypal email:
"Item/Product Name: 1× Info-impôts – Offre groupée d’out"

I now see this:
"Item/Product Name: Website Name - Order # XXX - 1× Inf"

So this works well for us because the customer can still identify what the transaction was for, even if there's accent characters in the product title.

To do this I used something like the following, in the paypal module file:
$desc = variable_get('site_name', $_SERVER['SERVER_NAME']) . " - " . "Order # " . $order->order_id . " - " . $desc;