fixed error with characters encoding

reusing the allocation codes array and availability array came back to
bite my arse when the encoding is 0, so i split the two. corrected the
issue. plus seems like the default placement of 0 character didn't
reserve the place for the whole time [intentional? check with Max]