Serial number formats / validation

Asked by Wolfgang Frisch

I need to implement a validator for USB printer serial numbers.

Is there a definitive list of allowed characters that can appear in an HP printer serial number?

I think [A-Za-z0-9_-] should be sufficient, but maybe I'm missing something. USB itself allows virtually any character except \0.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Wolfgang Frisch
Solved:
Last query:
Last reply:
Revision history for this message
Wolfgang Frisch (wfrisch) said :
#1

Question answered implicitly with the release of hplip-3.24.4.
Its generalize_serial() function now restricts serial numbers to [A-Za-z0-9_-].