SOLVED Is itoa broken in 1.5.2?

Would it be hard to replicate itoa in software?
WARNING: untested code

unsigned int x;
(x%10U); // ones digit
((x/10U)%10U); // tens digit
((x/100U)%10U); // hundreds digit
((x/1000U)%10U); // thousands digit
// and so forth
unsigned int x;
char xstr[]="00000";
xstr[4]='0'+(x%10U); // ones digit
xstr[3]='0'+((x/10U)%10U); // tens digit
xstr[2]='0'+((x/100U)%10U); // hundreds digit
xstr[1]='0'+((x/1000U)%10U); // thousands digit
xstr[0]='0'+((x/10000U)%10U); // myriads digit
unsigned long x;
char xstr[]="0000000000";
xstr[9]='0'+(x%10UL); // ones digit
xstr[8]='0'+((x/10UL)%10UL); // tens digit
xstr[7]='0'+((x/100UL)%10UL); // hundreds digit
xstr[6]='0'+((x/1000UL)%10UL); // thousands digit
xstr[5]='0'+((x/10000UL)%10UL); // myriads digit
xstr[4]='0'+((x/100000UL)%10UL); // lakhs digit
xstr[3]='0'+((x/1000000UL)%10UL); // millions digit
xstr[2]='0'+((x/10000000UL)%10UL); // crores digit
xstr[1]='0'+((x/100000000UL)%10UL); // "eok" or "oku" digit
xstr[0]='0'+((x/1000000000UL)%10UL); // billions digit