Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Base Ref

Utilities to transcode a integer from and to base 10 to a alphanumerical base where the handwritten numbers won't have potential homoglyphes. It was first developed in a defunct service called “dAgence” as base 33 for generating command references, hence the “base ref” name. It is actually a base 28.

This project is just an exercice (TDD and implementation in numerous languages), but you can use it and fork it. A work-in-progress (french written) post will be published during autumn 2014.

But if you find it really useful, I'll be happy.

Author : Xavier "dascritch" Mouton-Dubosc

Contributors :

Blogged about it there (in French):

  1. Relire un numéro de commande écrit à la main


The “conventionnal” base 36 uses numbers then letters : 0123456789ABCDEFHIJKLMNOPQRSTUVWXYZ

I'm removing any letter that may be confused with numbers when (badly) handwritten :BGILOSYZ

We have 28 available glyphes : 0123456789ACDEFHJKMNPQRTUVWX

Do you read E55S or EGGS ?


  • Coding rules are : TDD, DRY, safe
  • Is it possible to do TDD in various languages with only one specification file ?
  • Do tests suite have different behaviours ?
  • What language is smartest to read afterwards ?
  • Ok, it's OOP, but have we smartests patterns ?
  • How Json is decoded ?


The class should implements :

  • isValid(string)
  • true : if a string has the glyphes even lowercase or a empty string
  • false : elsewhere
  • encode(absolute integer)
  • string : the translated string
  • false : if not an absolute integer, like real or negative numbers or NaN
  • decode(string)
  • integer : the transcoded number
  • false : if not translatable It may have an exception for debug purposes


  • Javascript (with QUnit and Jasmine)
  • Python 3
  • PHP (with Atoum)
  • Ruby 1.9.3
  • C# (by Christopher Maneu)


Copyright (C) 2014 Xavier "dascritch" Mouton-Dubosc

This software is licenced under the GNU General Purpose Licence. Use it and deploy it as you want : i've done too much closed source before.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see


Repository :

Keeping in touch


Transcode a integer from and to base 10 to a alphanumerical handwritten-proof base






No releases published


No packages published