Unicode characters in a reader name

It is now possible to use Unicode characters in a reader name.

History

Since the beginning of pcsc-lite (at least since the first version of pcsc-lite in 2002 that is in a Version Control System) only a subset of ASCII was considered as legal characters for a PC/SC reader name.

In 2011 I added the character ";" in the list so that it is possible to use the "&" sign (encoded as "&" since the reader list is encoded as XML in the Info.plist file). This was to support a reader name like "Giesecke & Devrient".

In 2012 I added the characters "[" and "]".

In 2020 I add support of any Unicode character.

This request came from the use of the reader name "SoloKeys Solo 🐝". See the Salsa ticket "Unicode in USB Product string not supported." for more details.

Demo

First example

Β± pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
0: Ω…Ψ±Ψ­Ψ¨Ψ§ Ψ¨Ψ§Ω„ΨΉΨ§Ω„Ω… πŸ˜€ πŸŽ‚ 00 00
1: Χ©ΧœΧ•Χ Χ’Χ•ΧœΧ 😎 😼 01 00

Sat May 16 10:52:58 2020
Reader 0: Ω…Ψ±Ψ­Ψ¨Ψ§ Ψ¨Ψ§Ω„ΨΉΨ§Ω„Ω… πŸ˜€ πŸŽ‚ 00 00
Event number: 1
Card state: Card removed,
Reader 1: Χ©ΧœΧ•Χ Χ’Χ•ΧœΧ 😎 😼 01 00
Event number: 0
Card state: Card inserted,
ATR: 3B BE 96 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00
In case you do not have the correct font installed in your web browser here is a picture version of the same output.

You can note that the reader names are reversed between the text version and the image version. I let you find what is the "problem" here.

Second example

Β± pcsc_scan 
Using reader plug'n play mechanism
Scanning present readers...
0: 😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 00 00
1: πŸ’‹πŸ’˜πŸ’πŸ’–πŸ’—πŸ’“πŸ’žπŸ’•πŸ’ŸπŸ’”πŸ§‘πŸ’›πŸ’šπŸ’™πŸ’œπŸ–€ 01 00
 
Sat May 16 11:17:00 2020
 Reader 0: 😺 😸 😹 😻 😼 😽 πŸ™€ 😿 😾 00 00
  Event number: 0
  Card state: Card removed, 
 Reader 1: πŸ’‹πŸ’˜πŸ’πŸ’–πŸ’—πŸ’“πŸ’žπŸ’•πŸ’ŸπŸ’”πŸ§‘πŸ’›πŸ’šπŸ’™πŸ’œπŸ–€ 01 00
  Event number: 0
  Card state: Card inserted, 
  ATR: 3B BE 96 00 00 41 03 00 00 00 00 00 00 00 00 00 02 90 00
Again with the screen capture:

Of course you have no obligation to use some many funny Unicode characters in your reader name. It was just an example.

Availability

You need to use CCID version 1.4.33 or more and pcsc-lite version 1.9.0 or more.

These versions are not yet available (when I write this article) so I prepared snapshot of both software at http://ludovic.rousseau.free.fr/softwares/pcsc-lite/. They are pcsc-lite-1.8.26-047789c.tar.bz2 and ccid-1.4.32-e782d48.tar.bz2.

You can also use the current git version of pcsc-lite and ccid if you know what you do.

Linux

I made the development and tests on a Debian GNU/Linux system.

macOS

I also tested the new CCID driver on macOS Mojave and it works fine with Unicode characters. I found no issue.

Conclusion

I do not expect to see many smart card readers with emoticons, but maybe names with characters from non-Latin alphabets.