We have a plugin that takes orders from CarthThrob and then creates a special file for the distributor. This plugin grabs the order information and converts it to a special file type and format they use to fulfill orders. One part of that is to take the three letter country code and convert that to the three digit currency code. It works for most countries, however those that start with a zero don't work.
What we find is that instead of converting the letter code to the right numeric code it converts AUS (should be 036) to 030, Armenia (051) to 041, and Argentina (032) to 026?
This mightn't be a question for the EE community, but thought I'd start here in case someone can see a pattern or maybe it is some binary thing that is doing math and converting that to a different number.
Sample of the code (not all of it):
private function alpha_three_to_numeric_country($country)
{
switch ($country) {
case "AFG":
return 004;
break;
case "ALA":
return 248;
break;
case "ALB":
return 008;
break;
case "DZA":
return 012;
break;
case "ASM":
return 016;
break;
case "AND":
return 020;
break;
case "AGO":
return 024;
break;
case "AIA":
return 660;
break;
case "ATA":
return 010;
break;
case "ATG":
return 028;
break;
case "ARG":
return 032; etc...