more robust encoding of non-ascii characters
allow custom reference codes
Merge branch 'master' into no_version_pins