Credit Card validation: can Card Name contain non-ASCII characters?
Asked Answered
S

5

31

Can the Card Name (i.e. the cardholder name, not the card type) contain non-ASCII characters? Example: "JOSÉ GONZÁLEZ".

Spitler answered 5/1, 2010 at 6:30 Comment(0)
P
34

The character set that is used does not allow for diacritics. In brief, it only allows uppercase ASCII characters.

The restriction ultimately comes from the historical way in which banking cards encode data onto the magnetic stripe (as defined in ISO 7811). The data is encoded in a 7 bits per character format known as ITU-T.50

The cardholder name is encoded with up to 26 characters, each within the range from hex 20-5F. You can see the table for this here: http://www.zytrax.com/tech/ia5.html

Patin answered 5/1, 2010 at 10:13 Comment(7)
According to that link, it's not ASCII, but "ANSI/ISO ALPHA", which looks like the subset of ASCII from 0x20 to 0x5F mapped to 0x00...0x3F and an odd parity bit added to the end. The numbers look like ASCII from 0x30 to 0x3F mapped to 0x0...0xF and an odd parity bit added to the end. So there's not even lowercase letters, much less high-ASCII or any potential for UTF-8 support.Solferino
Yes it appears that far from being too strict (my app currently allows printable ASCII characters only), I'm actually being too lenient! However, I'm sure users would be annoyed if I start rejecting lower-case letters, so I'll probably leave it be. My main fear was that I was rejecting legitimate cards, so I'm relieved that this is not the case.Spitler
I don't think you understand. There is no way to represent lowercase letters with the encoding on a credit card's magnetic stripe. They're not even in the character set.Solferino
I do understand. I just meant that from a usability perspective, users will get frustrated if the card name is rejected because they typed it in lower case. Therefore I'll just convert any lower case letters to upper case.Spitler
In fairness, the card name is useless for almost all payments, the only exceptions being things like when paying for airline tickets or car rental by card (for which the data is captured for later criminal style investigations). Almost every time I'm asked for my name as printed on the card I type something like 'Mr Silly McDuff'.Patin
@MrSnrub, when only allowing certain characters when submitting, it may be better to allow more characters then convert on server-side to only allowed characters. That would be even better usability than out-right barring the character in the form. For example, José González—Henrik O’Hare could be submitted by the user, but would be converted to JOSE GONZALEZ HENRIK O HARE on the server. P.S. according to Sergey Ponomarev's answer, some punctuation like apostrophes and dashes are allowed.Ruction
this link is unsafe, please add another onePostulant
S
16

Magnetic stripe can store even punctuation symbols like ! " * # % & ( ) ^ : ; < > = ? [ / ] _
But in practice cardholders names uses only:

  • Range of English uppercase letters
  • Apostrophe (') for names like "Gareth O'Hare"
  • Minus (-) for double names like "Alexandru-Cristian"
  • Dot (.) for honorific prefixes like "MR.", "MRS.", "MISS.", "MS.", "DR.", "THE."
  • Dot (.) for initials like "Jimmy L. Morgan", "J.P. Teron"
Slimy answered 2/9, 2015 at 10:31 Comment(0)
C
2

Indeed, only ASCII characters are allowed. But other manipulation is allowed. One can print the name on the first or the second line. One can choose with or without dots and so on.

So, you can't make the customer happy with diacrits (thinks Norwegian and German names). But you can the customer let choose between full firstname of only one character (e.g. JOSE GONZALES or J. GONZALES). It helps to make the customer happy.

Cedeno answered 5/1, 2010 at 21:2 Comment(0)
O
2

Chip cards (aka smart Cards, EMV cards) contain and can return a plethora of different values including "Cardholder Name" (tag 5F20) and "Cardholder Name Extended" (tag 9F0B). EMV Co. says that both of these tags should follow ISO 7813 but I've already seen one card (an "NH Card" from Korea Air) in which tag 5F20 contained lowercase characters. Pandora's box has been opened!

Ogive answered 25/10, 2018 at 11:59 Comment(0)
W
1

The credit card processors I've used in the past only allowed ASCII in the cardholder name, but you should check with your credit card processor to see what their requirements/restrictions are.

Wollongong answered 5/1, 2010 at 6:44 Comment(1)
FWIW, looking on Google Image Search for "jcb card" (A Japanese credit card) shows cards with ASCII cardholder names. If even Japanese credit cards use only ASCII, it seems posible that this limitation is universal.Wollongong

© 2022 - 2024 — McMap. All rights reserved.