Pound symbol comes in camel message as? -


i facing issue pound symbol coming in messages camel route , pound symbol when comes in json request on camel rest endpoint , gets converted "?" same gets shown on log too.

i have tried below ways fix setting convertbodyto tag charset utf-8 didn't worked.

camel version used 2.10. locale : en_us.

here route :

<from uri="jetty:http://localhost:8080/testservice"/>
<camel:convertbodyto type="string" charset="utf-8" /> <camel:log message="message body: ${body}" /> <to uri="jetty:http://localhost:8080/testendpoints"/>

you need know encoding client uses when posting json. browser should send encoding information in content-type header field.

if pound sign shows single question mark, indicates stream has single-byte encoding. if multi-byte , read single byte encoding show 2 garbage characters, not one. if content-type header not specify encoding, try setting western single byte encoding iso-8859-1 instead of utf-8 , see if works. locale en_us default encoding us-ascii.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -