Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 characters are stripped out of basket item name #57

Open
judgej opened this issue Apr 7, 2016 · 0 comments
Open

UTF-8 characters are stripped out of basket item name #57

judgej opened this issue Apr 7, 2016 · 0 comments
Labels

Comments

@judgej
Copy link
Member

judgej commented Apr 7, 2016

This is done in

protected function filterDiscountName($name)

It treats the item description as an ASCII string and strips out any non-ASCII character. This results in Western European international characters being removed, which are commonly used.

Instead, an attempt should be made to map the UTF-8 string (testing that it is valid UTF-8 first) to extended ASCII (ISO-8859-1) which Sage Pay uses, so we get to keep as much of the item's meaning as possible.

It should also be noted that recently some of the Sage Pay APIs started accepting UTF-8 characters and makes its own attempt at converting to ISO8859-1. This has been a long time coming (I've been complaining about this for five years) but some end-to-end tests may tell us more about exactly what character sets can be sent through the basket XML.

@judgej judgej added the bug label Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant