question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues handling non-ascii characters

See original GitHub issue

General information

  • SDK/Library version: v1.19.0
  • Environment: Sandbox and Production
  • Browser and OS : Any browser and OS

Issue description

With 3D-Secure 2.0, we’re advised to send a billingAddress ‘object’, this object contains things such as given name, surname, address - however, someone came up with the idea to only accept printable ASCII characters in these fields, meaning anyone that lives in a country with letters being non-ascii (even with letters being in the “extended ascii”) can apparently not complete orders with the drop-in UI due to the API call below only accepts ASCII.

https://api.sandbox.braintreegateway.com/merchants/XXXXXX/client_api/v1/payment_methods/XXXXXXX/three_d_secure/lookup

Supplying a non-ascii name, such as “Jørgen” will result in the message:

{"error":{"message":"Billing given name format is invalid."},"threeDSecureInfo":{"liabilityShifted":false,"liabilityShiftPossible":false}}

Braintree is able to create customers containing non-ascii characters (such as æ, ø, å, ü etc) - so I can’t see why the lookup shouldn’t support it.

In this case, what’s the advised way of handling this? As far as I know, there’s no standardized way to convert non-ascii to ascii in javascript (if anyone knows a library that does this… please share!) - and from a 3DS integration perspective, what format does banks expect?

The billingAddress object is used for banks to determine whether there should be a challenge or not - so in case we have a bank with a customer that contains non-ascii characters, then, do they expect Jorgen, joergen, or what format is expected to be accepted?

To replicate the issue, simply use the codepen provided in the #480 issue, and change Jane to Jørgen and see stuff fail.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
lucasRolffcommented, Aug 28, 2019

I’ve been in contact with EMVCo, after they realized that it’s quite common that cardholder schemes use UTF-8 in cardholder names, EMVCo will update their endpoints to support UTF-8.

The official reply:

Hi,

The Character set of “cardholdername” will be updated from ASCII to UTF-8 in the next specification bulletin.

Please continue to visit the EMVCo website for further updates.

Kind regards, The 3DS team

1reaction
lucasRolffcommented, Aug 15, 2019

A small update - I contacted the danish divisions of VISA and Mastercard - and they indeed confirmed that they use æ, ø and å and even é (e.g. if people e.g. are called René) when issuing cards - so both VISA and Mastercard apparently goes against their own rules.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Non-ASCII Characters in a URL
We'll show you how to fix non-ASCII characters within a URL. Learn more about what characters are valid for URLs.
Read more >
Are there historical problems with non-ASCII identifier ...
This is the answer. A lack of a standard global character encoding reduces us to the a subset supported by anyone using a...
Read more >
Non-printable characters: Problems and how to overcome ...
PROBLEMS CAUSED BY NON PRINTABLE & SPECIAL CHARACTERS ... Even while handling only non printable characters, this method has certain restrictions.
Read more >
ISSUE-19: How are non-ASCII characters handled in CSP
I was just reading through the CSP draft, and I'm very concerned by the handling of non-ASCII characters in CSP. Specifically, I'm concerned...
Read more >
Parola A to Z – Handling non ASCII characters (UTF-8)
At its basic level, the issue is that non-ASCII characters are being processed as ASCII characters. Parola can be used to display non-ASCII...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found