if you have this problem (or like this problem), there's a whitepaper on this topic (with a different encoding scheme) here: http://www.zanopha.com/docs/elen.pdf
I implemented a decent portion of it here for a Go project: https://github.com/jordanorelli/lexnum
the whitepaper also discusses an implementation that accommodates floating point numbers, but I didn't implement that portion. This encoding scheme works well for file names.