• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Base 42

jitspoe

Senior member
Ok, google has failed me. I've got some values stored in base 42 and need to convert them.

Examples:
0!!7!
0RLYU
0RL_0
0RM$N
0S@!9
0S@!@
0S@!A
0RM%_
0RM@H

Here's what I came up with, but I'm not 100% sure it's right:
g_mBase42Remap['!'] = 0;
g_mBase42Remap['$'] = 1;
g_mBase42Remap['%'] = 2;
g_mBase42Remap['-'] = 3;
g_mBase42Remap['0'] = 4;
g_mBase42Remap['1'] = 5;
g_mBase42Remap['2'] = 6;
g_mBase42Remap['3'] = 7;
g_mBase42Remap['4'] = 8;
g_mBase42Remap['5'] = 9;
g_mBase42Remap['6'] = 10;
g_mBase42Remap['7'] = 11;
g_mBase42Remap['8'] = 12;
g_mBase42Remap['9'] = 13;
g_mBase42Remap['@'] = 14;
g_mBase42Remap['A'] = 15;
g_mBase42Remap['B'] = 16;
g_mBase42Remap['C'] = 17;
g_mBase42Remap['D'] = 18;
g_mBase42Remap['E'] = 19;
g_mBase42Remap['F'] = 20;
g_mBase42Remap['G'] = 21;
g_mBase42Remap['H'] = 22;
g_mBase42Remap['I'] = 23;
g_mBase42Remap['J'] = 24;
g_mBase42Remap['K'] = 25;
g_mBase42Remap['L'] = 26;
g_mBase42Remap['M'] = 27;
g_mBase42Remap['N'] = 28;
g_mBase42Remap['O'] = 29;
g_mBase42Remap['P'] = 30;
g_mBase42Remap['Q'] = 31;
g_mBase42Remap['R'] = 32;
g_mBase42Remap['S'] = 33;
g_mBase42Remap['T'] = 34;
g_mBase42Remap['U'] = 35;
g_mBase42Remap['V'] = 36;
g_mBase42Remap['W'] = 37;
g_mBase42Remap['X'] = 38;
g_mBase42Remap['Y'] = 39;
g_mBase42Remap['Z'] = 40;
g_mBase42Remap['_'] = 41;
 
actually, i did some research on this, base 13 is more what you want to use in relation to that book
 
I'm not converting TO base 42, I'm converting FROM it. Why these values were stored in base 42, I don't know. I just need to convert them into something usable.

Edit: Seems that panned out.
 
Back
Top