From: Intransition Date: 2010-11-03T01:18:44+09:00 Subject: Re: Standard Base62 Encoding? On Nov 1, 6:20 pm, Robert Klemme wrote: > On 01.11.2010 20:27, Intransition wrote: > > > Is there a standard encoding for base62? I've been using 0..9a..zA..Z, > > but I think I should switch that to 0..9A..Za..z, so it would sort > > properly according to ASCII order. I wasn't able to find anything on a > > standard via a Google search. So maybe there just isn't one? > > > I was kind of surprised to see Ruby uses lower case a..f for > > hexadecimal rather than uppercase. > > >    "255.to_s(16)  #=>  "ff" > > irb(main):003:0> "0x%02X" % 255 > => "0xFF" > > I have no idea though, why you want to use Base62 encoding when there is > a standard implementation of Base64 encoding. I'm not using it as such. My question is for my Radix project which can convert any base to any other. 62 is the max limit for a string representation of a number. I wanted to keep them limited to Latin characters. As for as base-62, from what I understand is used for basically that same reason. Say you want to "scramble" file names, but need to make sure they are still valid filenames. Encoding in Base-62 is good for that.