=== added file 'shipping/uc_usps/uc_usps.countries.inc'
--- shipping/uc_usps/uc_usps.countries.inc	1970-01-01 00:00:00 +0000
+++ shipping/uc_usps/uc_usps.countries.inc	2009-10-12 22:33:43 +0000
@@ -0,0 +1,263 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Contains the map of ISO country codes to USPS Individual Country Listings.
+ */
+
+/**
+ * Return the country name formatted according to the USPS requirements.
+ * @see http://ircalc.usps.gov
+ */
+function uc_usps_country_map($code = NULL) {
+  // Note that these values were taken from the USPS International Rate
+  // Calculator website (http://ircalc.usps.gov/), not the page mentioned in
+  // the API documentation (http://pe.usps.com/text/Imm/immctry.htm). Many
+  // entries in the latter were found to be incorrect.
+  $countries = array(
+    4   => 'Afghanistan',
+    248 => 'Aland Island (Finland)',
+    8   => 'Albania',
+    12  => 'Algeria',
+    16  => 'American Samoa',
+    20  => 'Andorra',
+    24  => 'Angola',
+    660 => 'Anguilla',
+    28  => 'Antigua and Barbuda',
+    32  => 'Argentina',
+    51  => 'Armenia',
+    533 => 'Aruba',
+    36  => 'Australia',
+    40  => 'Austria',
+    31  => 'Azerbaijan',
+    44  => 'Bahamas',
+    48  => 'Bahrain',
+    50  => 'Bangladesh',
+    52  => 'Barbados',
+    112 => 'Belarus',
+    56  => 'Belgium',
+    84  => 'Belize',
+    204 => 'Benin',
+    60  => 'Bermuda',
+    64  => 'Bhutan',
+    68  => 'Bolivia',
+    70  => 'Bosnia-Herzegovina',
+    72  => 'Botswana',
+    76  => 'Brazil',
+    96  => 'Brunei Darussalam',
+    100 => 'Bulgaria',
+    854 => 'Burkina Faso',
+    108 => 'Burundi',
+    116 => 'Cambodia',
+    120 => 'Cameroon',
+    124 => 'Canada',
+    132 => 'Cape Verde',
+    136 => 'Cayman Islands',
+    140 => 'Central African Republic',
+    148 => 'Chad',
+    152 => 'Chile',
+    156 => 'China',
+    162 => 'Christmas Island (Australia)',
+    166 => 'Cocos Island (Australia)',
+    170 => 'Colombia',
+    174 => 'Comoros',
+    178 => 'Congo, Republic of the',
+    180 => 'Congo, Democratic Republic of the',
+    184 => 'Cook Islands (New Zealand)',
+    188 => 'Costa Rica',
+    384 => 'Cote d Ivoire (Ivory Coast)',
+    191 => 'Croatia',
+    192 => 'Cuba',
+    196 => 'Cyprus',
+    203 => 'Czech Republic',
+    208 => 'Denmark',
+    262 => 'Djibouti',
+    212 => 'Dominica',
+    214 => 'Dominican Republic',
+    218 => 'Ecuador',
+    818 => 'Egypt',
+    222 => 'El Salvador',
+    226 => 'Equatorial Guinea',
+    232 => 'Eritrea',
+    233 => 'Estonia',
+    231 => 'Ethiopia',
+    238 => 'Falkland Islands',
+    234 => 'Faroe Islands',
+    242 => 'Fiji',
+    246 => 'Finland',
+    250 => 'France',
+    254 => 'French Guiana',
+    258 => 'French Polynesia',
+    266 => 'Gabon',
+    270 => 'Gambia',
+    268 => 'Georgia, Republic of',
+    276 => 'Germany',
+    288 => 'Ghana',
+    292 => 'Gibraltar',
+    300 => 'Greece',
+    304 => 'Greenland',
+    308 => 'Grenada',
+    312 => 'Guadeloupe',
+    316 => 'Guam',
+    320 => 'Guatemala',
+    831 => 'Guernsey, Channel Islands (Great Britain)',
+    324 => 'Guinea',
+    624 => 'Guinea-Bissau',
+    328 => 'Guyana',
+    332 => 'Haiti',
+    336 => 'Vatican City',
+    340 => 'Honduras',
+    344 => 'Hong Kong',
+    348 => 'Hungary',
+    352 => 'Iceland',
+    356 => 'India',
+    360 => 'Indonesia',
+    364 => 'Iran',
+    368 => 'Iraq',
+    372 => 'Ireland',
+    833 => 'Isle of Man (Great Britain)',
+    376 => 'Israel',
+    380 => 'Italy',
+    388 => 'Jamaica',
+    392 => 'Japan',
+    832 => 'Jersey (Channel Islands) (Great Britain)',
+    400 => 'Jordan',
+    398 => 'Kazakhstan',
+    404 => 'Kenya',
+    296 => 'Kiribati',
+    408 => 'Korea, Democratic Peoples Republic of (North Korea)',
+    410 => 'Korea, Republic of (South Korea)',
+    414 => 'Kuwait',
+    417 => 'Kyrgyzstan',
+    418 => 'Laos',
+    428 => 'Latvia',
+    422 => 'Lebanon',
+    426 => 'Lesotho',
+    430 => 'Liberia',
+    434 => 'Libya',
+    438 => 'Liechtenstein',
+    440 => 'Lithuania',
+    442 => 'Luxembourg',
+    446 => 'Macao',
+    807 => 'Macedonia, Republic of',
+    450 => 'Madagascar',
+    454 => 'Malawi',
+    458 => 'Malaysia',
+    462 => 'Maldives',
+    466 => 'Mali',
+    470 => 'Malta',
+    584 => 'Marshall Islands',
+    474 => 'Martinique',
+    478 => 'Mauritania',
+    480 => 'Mauritius',
+    175 => 'Mayotte (France)',
+    484 => 'Mexico',
+    583 => 'Micronesia, Federated States of',
+    498 => 'Moldova',
+    492 => 'Monaco (France)',
+    496 => 'Mongolia',
+    499 => 'Montenegro',
+    500 => 'Montserrat',
+    504 => 'Morocco',
+    508 => 'Mozambique',
+    104 => 'Myanmar (Burma)',
+    516 => 'Namibia',
+    520 => 'Nauru',
+    524 => 'Nepal',
+    528 => 'Netherlands',
+    530 => 'Netherlands West Indies (Netherlands Antilles)',
+    540 => 'New Caledonia',
+    554 => 'New Zealand',
+    558 => 'Nicaragua',
+    562 => 'Niger',
+    566 => 'Nigeria',
+    570 => 'Niue (New Zealand)',
+    574 => 'Norfolk Island (Australia)',
+    580 => 'Northern Mariana Islands, Commonwealth of',
+    578 => 'Norway',
+    512 => 'Oman',
+    586 => 'Pakistan',
+    585 => 'Palau',
+    591 => 'Panama',
+    598 => 'Papua New Guinea',
+    600 => 'Paraguay',
+    604 => 'Peru',
+    608 => 'Philippines',
+    612 => 'Pitcairn Island',
+    616 => 'Poland',
+    620 => 'Portugal',
+    630 => 'Puerto Rico',
+    634 => 'Qatar',
+    638 => 'Reunion',
+    642 => 'Romania',
+    643 => 'Russia',
+    646 => 'Rwanda',
+    652 => 'St. Barthelemy (Guadeloupe)',
+    654 => 'Saint Helena',
+    659 => 'Saint Kitts (St. Christopher and Nevis)',
+    662 => 'Saint Lucia',
+    663 => 'Saint Martin (French part) (Guadeloupe)',
+    666 => 'Saint Pierre and Miquelon',
+    670 => 'Saint Vincent and the Grenadines',
+    882 => 'Western Samoa',
+    674 => 'San Marino',
+    678 => 'Sao Tome and Principe',
+    682 => 'Saudi Arabia',
+    686 => 'Senegal',
+    688 => 'Serbia, Republic of',
+    690 => 'Seychelles',
+    694 => 'Sierra Leone',
+    702 => 'Singapore',
+    703 => 'Slovak Republic',
+    705 => 'Slovenia',
+    90  => 'Solomon Islands',
+    706 => 'Somalia',
+    710 => 'South Africa',
+    239 => 'South Georgia (Falkland Islands)',
+    724 => 'Spain',
+    144 => 'Sri Lanka',
+    736 => 'Sudan',
+    740 => 'Suriname',
+    744 => 'Norway',
+    748 => 'Swaziland',
+    752 => 'Sweden',
+    756 => 'Switzerland',
+    760 => 'Syrian Arab Republic',
+    158 => 'Taiwan',
+    762 => 'Tajikistan',
+    834 => 'Tanzania',
+    764 => 'Thailand',
+    626 => 'East Timor (Indonesia)',
+    768 => 'Togo',
+    772 => 'Tokelau (Union) Group (Western Samoa)',
+    776 => 'Tonga',
+    780 => 'Trinidad and Tobago',
+    788 => 'Tunisia',
+    792 => 'Turkey',
+    795 => 'Turkmenistan',
+    796 => 'Turks and Caicos Islands',
+    798 => 'Tuvalu',
+    800 => 'Uganda',
+    804 => 'Ukraine',
+    784 => 'United Arab Emirates',
+    826 => 'United Kingdom (Great Britain)',
+    858 => 'Uruguay',
+    860 => 'Uzbekistan',
+    548 => 'Vanuatu',
+    862 => 'Venezuela',
+    704 => 'Vietnam',
+    92  => 'British Virgin Islands',
+    850 => 'Virgin Islands',
+    876 => 'Wallis and Futuna Islands',
+    887 => 'Yemen',
+    894 => 'Zambia',
+    716 => 'Zimbabwe',
+  );
+
+  if ($code) {
+    return $countries[$code];
+  }
+
+  return $countries;
+}

=== modified file 'shipping/uc_usps/uc_usps.module'
--- shipping/uc_usps/uc_usps.module	2008-11-20 19:23:25 +0000
+++ shipping/uc_usps/uc_usps.module	2009-10-12 22:33:54 +0000
@@ -490,14 +490,15 @@
 /*
  * uc_usps_intl_rate_request function (added by Erik - feel free to improve)
  *
+ * @see uc_usps_country_map()
  */
 
 function uc_usps_intl_rate_request($packages, $origin, $destination) {
+  require_once './' . drupal_get_path('module', 'uc_usps') . '/uc_usps.countries.inc';
   $request  = '<IntlRateRequest USERID="' . variable_get('uc_usps_user_id', '') . '">';
   $services_count = 0;
 
-  // This needs to be international name per USPS website. See http://pe.usps.com/text/Imm/immctry.htm
-  $shipto_country = uc_get_country_data(array('country_id' => $destination->country));
+  $shipto_country = uc_usps_country_map($destination->country);
 
   foreach ($packages as $package) {
     $qty = $package->qty;
@@ -506,7 +507,7 @@
         '<Pounds>' . intval($package->pounds) . '</Pounds>' .
         '<Ounces>' . ceil($package->ounces) . '</Ounces>' .
         '<MailType>Package</MailType>' .
-        '<Country>'.$shipto_country[0]['country_name'].'</Country>' .
+        '<Country>' . htmlspecialchars($shipto_country) . '</Country>' .
         '</Package>';
 
       $services_count++;

