title: AWS CLI - 'ascii' codec can't encode character u'\xff' in position 26
body: <p>I have a large number of route53 records that I have to move and am following <a href="https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zones-migrating.html</a></p>
  
  <p>I have created the txt file and have updated it, but when I run the command, I get the following error</p>
  
  <pre><code>PS C:\&gt; aws route53 change-resource-record-sets --hosted-zone-id ZNEWZONE1245 --profile new_account --change-batch file://list-records-ZNEWZONE1245.json
  
  'ascii' codec can't encode character u'\xff' in position 26: ordinal not in range(128)
  </code></pre>
  
  <p>here is the contant for <code>list-records-ZNEWZONE1245.json</code></p>
  
  <pre><code>{
      "Comment": "Import domain.tld route53 sets",
      "Changes": [
          {
              "Action": "CREATE",
              "ResourceRecordSet":{
                  "ResourceRecords": [
                      {
                          "Value": "192.0.2.4"
                      }
                  ], 
                  "Type": "A", 
                  "Name": "domain.tld.", 
                  "TTL": 300
              }
          },
          {
              "Action": "CREATE",
              "ResourceRecordSet":{
                  "ResourceRecords": [
                      {
                          "Value": "5 ALT2.ASPMX.L.GOOGLE.COM"
                      }, 
                      {
                          "Value": "1 ASPMX.L.GOOGLE.COM"
                      }, 
                      {
                          "Value": "10 ALT4.ASPMX.L.GOOGLE.COM"
                      }, 
                      {
                          "Value": "10 ALT3.ASPMX.L.GOOGLE.COM"
                      }, 
                      {
                          "Value": "5 ALT1.ASPMX.L.GOOGLE.COM"
                      }
                  ], 
              "Type": "MX", 
              "Name": "domain.tld.", 
              "TTL": 300
          }
      }
      ]
  }
  </code></pre>
  
  <p>Any advise is much appreciated.</p>