# What's purpose of function SystemPrivateLookupCodeByName and SystemPrivateLookupNameByCode [closed]

These are useful function from their name.And they are kernel function since:

SystemPrivateHasAnyCodesQ /@ {SystemPrivateLookupCodeByName,
SystemPrivateLookupNameByCode}


{True, True}

But how to use them?

• Are you really going to eventually ask about all the undocumented functions? – J. M.'s technical difficulties Jan 22 '17 at 16:53
• @J.M. I just think they are makes sense maybe. :) – yode Jan 22 '17 at 16:54
• They do have Private in them... – Daniel Lichtblau Jan 22 '17 at 16:56
• But these turn out not be that interesting. One can do the same thing with top-level functions, pretty much as efficiently as needed. I think many of the internal functions are just auxiliary functions written for other higher-level functions. – Michael E2 Jan 22 '17 at 18:59

I tried random inputs until I got something to work. It looks like it has to do with character codes:

SystemPrivateLookupNameByCode[200]

"CapitalEGrave"


And then we can plug in the reverse:

SystemPrivateLookupCodeByName["CapitalEGrave"]

200


Edit by yode as J.M.'s comment

Grid[DeleteCases[{#, FromCharacterCode[#],
SystemPrivateLookupNameByCode[#]} & /@
Range[100, 174], {_, _, \$Failed}], Frame -> All]


• So, a bit like FromCharacterCode[] and ToCharacterCode[], but with the character names and not the characters themselves. – J. M.'s technical difficulties Jan 22 '17 at 16:56
• ...and they (Lookup*) fail on ASCII characters. – Michael E2 Jan 22 '17 at 18:08
• @MichaelE2 ... and also fail on such special characters as \! and $$ etc.: SystemPrivateLookupNameByCode[ToCharacterCode["\!\($$"]]`. – Alexey Popkov May 17 '17 at 14:11