Loading...

openbd@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[OpenBD] Sending a json in cfhttp body seems to be not properly encoded in utf 8 David G Ortega Mon Apr 02 13:00:52 2012

Hi guys,

I trying to send json with utf 8  characters to elasticsearch and it
fails :(

for the string  "Joe's Café & Bar"
I trying to send:

{"images":[],"title":"Joe's Café & Bar","desc":"vamos de fiesta porqu
mola","address":"29600 Marbella
Malaga","pub":"chingame","type":"gob","date":"2012-04-02T21:45:49","lnkSrc":"","id":"0F5C9887E1AE414AB92085C58F7C626C","geo":
{"lon":-4.7743365,"lat":
36.5194999,"countryCode":"ES","mapsName":"29600 Marbella,
Spain"},"encoding":"ISO-8859-1","language":"es","tokens":
["joe's","caf","bar","vam","fiest","porqu","mol"],"keywords":
["porqu","vam","joe's","fiest","bar","caf","mol"]}

 and elastic search response is

{"error":"MapperParsingException[Failed to parse [title]]; nested:
JsonParseException[Invalid UTF-8 middle byte 0x20\n at [Source:
[EMAIL PROTECTED]; line: 1, column: 34]]; ","status":400}

I have tried to set the charset utf8 in the cfhttp tag but nothing...

Any idea?

Thanks

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en