Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Issues with UTF8 Strings as ressource (bad_utf8_character_code) #491

bitcloud opened this Issue · 2 comments

3 participants


There seems to be a Problem with storing records with UTF8 chars in the URI
A quick curl samlpe for that is:

Insert Key:

curl -X PUT http://localhost:8098/riak/test/testäöü -H 'content-type: application/json' -v

Check if inserted:

curl -X GET http://localhost:8098/riak/test/testäöü -v

This one breaks:

curl -X POST "http://localhost:8098/mapred" -H "Content-Type: application/json" -d '{"inputs": "test","query":[{"map":{"name":"Riak.mapValuesJson","language":"javascript"}}]}' -v

This is the response:

* Adding handle: conn: 0x7fa3c180ee00
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fa3c180ee00) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 8098 (#0)
*   Trying ::1...
*   Trying
* Connected to localhost ( port 8098 (#0)
> POST /mapred HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:8098
> Accept: */*
> Content-Type: application/json
> Content-Length: 90
* upload completely sent off: 90 out of 90 bytes
< HTTP/1.1 500 Internal Server Error
* Server MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact) is not blacklisted
< Server: MochiWeb/1.1 WebMachine/1.10.0 (never breaks eye contact)
< Date: Thu, 13 Feb 2014 15:33:06 GMT
< Content-Type: text/html
< Content-Length: 1312
<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>The server encountered an error while processing this request:<br><pre>{error,{exit,{ucs,{bad_utf8_character_code}},
* Connection #0 to host localhost left intact
                                    {line,186}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>%

/cc @macintux, he just spent some time debugging UTF8 issues, but I think that was in regards to security. I'll leave this here for now and put it on the 2.1 milestone.

@jaredmorrow jaredmorrow added this to the 2.1 milestone

I believe its a known issue that Riak's erlang_js does not support unicode cc/ @cmeiklejohn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.