View Single Post
Old 29-01-2008, 12:31   #10 (permalink)
proc355
Senior Member
 
proc355's Avatar
 
Join Date: Sep 2006
Location: Glasvegas
Posts: 872
last time i checked ascii A == 65 & a == 97… etc.

0-9 are the problem—zero-pad them; you're always dealing with two numbers for each position then e.g.

78AF01 => 070865700001

build it as a string then parseint it

leading zero will probably be an issue if the field is indeed purely numeric; check the length on retrieval—if it's short add it/them back when before deserializing

why the fuck you would want to do it in javascript is beyond me though, this is for your server-side language to deal with (which may have a serializer that does just this—although i've never come across any that serializes just to numeric [off to check :P])

*ok scratch the bit about why javascript, im too lazy to edit it out
__________________
meh.
  Reply With Quote