I assume it's treating it as octal and 8 therefore is an invalid character. However, I need to take the string '08' and convert it to decimal 8.

Am I going to have to remove leading zeroes from the string? There must be a better way, surely?