{"action":"closed","issue":{"url":"https://api.github.com/repos/eXist-db/exist/issues/613","labels_url":"https://api.github.com/repos/eXist-db/exist/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/eXist-db/exist/issues/613/comments","events_url":"https://api.github.com/repos/eXist-db/exist/issues/613/events","html_url":"https://github.com/eXist-db/exist/issues/613","id":71736312,"number":613,"title":"Issues when adding a xml content with UTF-8 characters to an eXist-db collection using Perl","user":{"login":"rcastromamani","id":11825981,"avatar_url":"https://avatars.githubusercontent.com/u/11825981?v=3","gravatar_id":"","url":"https://api.github.com/users/rcastromamani","html_url":"https://github.com/rcastromamani","followers_url":"https://api.github.com/users/rcastromamani/followers","following_url":"https://api.github.com/users/rcastromamani/following{/other_user}","gists_url":"https://api.github.com/users/rcastromamani/gists{/gist_id}","starred_url":"https://api.github.com/users/rcastromamani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcastromamani/subscriptions","organizations_url":"https://api.github.com/users/rcastromamani/orgs","repos_url":"https://api.github.com/users/rcastromamani/repos","events_url":"https://api.github.com/users/rcastromamani/events{/privacy}","received_events_url":"https://api.github.com/users/rcastromamani/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-28T23:32:32Z","updated_at":"2015-04-30T08:35:14Z","closed_at":"2015-04-30T08:35:14Z","body":"I am trying to add dynamically generated XML content to a eXist-db collection (see the code below ```addFile.pl```) using Perl, the issue is that whenever the content contains UTF-8 characters I receive the error ``` Failed to parse XML-RPC request: Byte \"195\" is not a member of the (7-bit) ASCII character set.```\r\n\r\n```\r\n#!/usr/bin/perl\r\nuse RPC::XML;\r\nuse RPC::XML::Client;\r\nuse utf8;\r\n\r\nmy ($sec, $min, $hour, $mday, $mon, $year) = localtime();\r\nmy $timestamp = sprintf(\"%04d%02d%02d%02d%02d%02d\",$year+1900,$mon+1,$mday,$hour,$min,$sec);\r\nprint(\"Timestamp: $timestamp\\n\");\r\n\r\nmy $FILENAME = \"$timestamp.xml\";\r\nmy $COLLECTION = 'output';\r\n\r\nmy $record = <<END;\r\n<document id=\"doc_20150419014112\">\r\n  <text>ñáéíóú</text>\r\n</document>\r\nEND\r\n\r\n$query = <<END;\r\nxquery version \"3.0\";\r\nimport module namespace xmldb=\"http://exist-db.org/xquery/xmldb\";\r\ndeclare variable \\$filename := '$FILENAME';\r\ndeclare variable \\$record := '';\r\n\r\nlet \\$log-in := xmldb:login(\"/db\", \"admin\", \"admin\")\r\n(: let \\$create-collection := xmldb:create-collection(\"/db\", \"$COLLECTION\") :)\r\nlet \\$record := \r\n$record\r\n\r\nfor \\$target in ('/db/$COLLECTION')\r\n  return xmldb:store(\\$target, \\$filename, \\$record)\r\nEND\r\n\r\nprint $query;\r\n\r\n$URL = \"http://admin:admin\\@localhost:8080/exist/xmlrpc\";\r\n# connecting to $URL...\r\n$client = new RPC::XML::Client $URL;\r\n# Output options\r\n$options = RPC::XML::struct->new(\r\n    'indent' => 'yes', \r\n    'encoding' => 'UTF-8',\r\n    'highlight-matches' => 'none');\r\n$req = RPC::XML::request->new(\"query\", $query, 20, 1, $options);\r\n$response = $client->send_request($req);\r\nif($response->is_fault) {\r\n    die \"An error occurred: \" . $response->string . \"\\n\";\r\n}\r\nmy $result = $response->value;\r\nprint $result;\r\n```\r\n\r\nWhen I run the xquery script (see below) directly with eXide it runs normally but when I run it through the perl script I receive the following:\r\n\r\n```\r\n$ perl addFile.pl \r\n\r\nTimestamp: 20150428162016\r\nxquery version \"3.0\";\r\nimport module namespace xmldb=\"http://exist-db.org/xquery/xmldb\";\r\ndeclare variable $filename := '20150428162016.xml';\r\ndeclare variable $record := '';\r\n\r\nlet $log-in := xmldb:login(\"/db\", \"admin\", \"admin\")\r\n(: let $create-collection := xmldb:create-collection(\"/db\", \"output\") :)\r\nlet $record := \r\n<document id=\"doc_20150419014112\">\r\n  <text>ñáéíóú</text>\r\n</document>\r\n\r\n\r\nfor $target in ('/db/output')\r\n  return xmldb:store($target, $filename, $record)\r\nAn error occurred: Failed to parse XML-RPC request: Byte \"195\" is not a member of the (7-bit) ASCII character set.\r\n```\r\n"}}