{"id":1186,"date":"2013-09-11T14:07:06","date_gmt":"2013-09-11T14:07:06","guid":{"rendered":"http:\/\/www.geoplanit.co.uk\/?p=1186"},"modified":"2013-09-11T14:07:06","modified_gmt":"2013-09-11T14:07:06","slug":"arcgis-invalid-character-in-the-given-encoding-metadata-importer-issue-solved","status":"publish","type":"post","link":"https:\/\/www.geoplanit.co.uk\/?p=1186","title":{"rendered":"ArcGIS &#8220;invalid character in the given encoding&#8221; &#8211; Metadata Importer Issue : Solved?"},"content":{"rendered":"<p>ArcGIS has a beautiful way with words <a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.2\/index.html#\/\/00w100000002999999\">Error 999999<\/a> is my particular favourite message from ArcGIS:<\/p>\n<blockquote><p>This is a generic error for which the cause does not have a specific error ID.<\/p><\/blockquote>\n<p>However a recent error when running a script to <a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.2\/index.html#\/\/00120000000z000000\">import Metadata<\/a>\u00a0got me stumped, below is a brief description of the problem and the steps that seem to have fixed it.<\/p>\n<p>Running the Metadata Importer got me this message:<\/p>\n<blockquote><p>Executing: MetadataImporter &#8220;LOCATION\\FILE.MXD&#8221; &#8220;LOCATION\\FILE.MXD&#8221;<br \/>\nStart Time: Wed Sep 11 14:49:37 2013<br \/>\n<span style=\"color: #ff0000;\">Unable to obtain IMetadata from: <strong>LOCATION\\FILE.MXD\u00a0<\/strong>; Invalid character in the given encoding. Line 1, position 1.<\/span><br \/>\n<span style=\"color: #ff0000;\">Unable to obtain IMetadata from:\u00a0<strong>LOCATION\\FILE.MXD<\/strong><\/span><br \/>\n<span style=\"color: #ff0000;\">Failed to execute (MetadataImporter).<\/span><br \/>\nFailed at Wed Sep 11 14:49:37 2013 (Elapsed Time: 0.00 seconds)<\/p><\/blockquote>\n<p>The fix:<\/p>\n<p>I \u00a0couldn&#8217;t figure it out as I could see no other posts on the ArcGIS forums that described this problem. \u00a0Plenty of posts of the same message but no fixes other than through coding. \u00a0 Some of the solutions talked about <a href=\"http:\/\/en.wikipedia.org\/wiki\/Unicode\"><strong>UNICODE<\/strong> <\/a>issues, so I typed in &#8220;unicode and arcgis&#8221;, <a href=\"http:\/\/forums.arcgis.com\/threads\/17284-Unicode-problems!!!\">one of the links brought me to this post\u00a0<\/a>\u00a0and this image caught my eye:<\/p>\n<figure style=\"width: 281px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\" \" alt=\"\" src=\"http:\/\/forums.arcgis.com\/attachment.php?attachmentid=3541&amp;d=1290441654\" width=\"281\" height=\"339\" \/><figcaption class=\"wp-caption-text\">(from ArcGIS forums)<\/figcaption><\/figure>\n<p>What I did was change in ArcCatalog the table font to &#8220;Arial Unicode MS&#8221;.<\/p>\n<p>I then went and selected the MXD with metadata I wanted to change and deleted the title and re-typed any text of a small length.<\/p>\n<p>Then I ran the script again and it worked, no error messages and the metadat has now been imported.<\/p>\n<p><strong>Thoughts:\u00a0<\/strong> Is this a text formatting issue? I haven&#8217;t time to muck about looking into this but my hunch is that the metadata editor allows html formatting and somehow some hidden text formatting got in. \u00a0This would make sense as deleting the old title and retyping it again worked&#8230; hmmm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ArcGIS has a beautiful way with words Error 999999 is my particular favourite message from ArcGIS: This is a generic error for which the cause does not have a specific error ID. However a recent error when running a script to import Metadata\u00a0got me stumped, below is a brief description of the problem and the [&hellip;]<\/p>\n","protected":false},"author":161,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,81,64,7,54],"tags":[],"class_list":["post-1186","post","type-post","status-publish","format-standard","category-arcgis","category-error","category-esri","category-gis","category-tips"],"_links":{"self":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/users\/161"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1186"}],"version-history":[{"count":1,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1186\/revisions"}],"predecessor-version":[{"id":1187,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1186\/revisions\/1187"}],"wp:attachment":[{"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geoplanit.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}