Reference: Adapted from Knuth, D.E. (1973) The art of computer programming; Volume 3: Sorting and searching. Addison-Wesley Publishing Company: Reading, Mass. Page 392. Special cases: Leading or embedded spaces, numerals, or punctuation are squeezed out before encoding begins. Null strings or those with no encodable letters return the code 'Z000'.
Test data from Knuth (1973):
Euler E460 |
Gauss G200 |
Hilbert H416 |
Knuth K530 |
Lloyd L300 |
Lukasiewicz L222 |