Proper way to encode a string in Multipart Request

24 views
Skip to first unread message

mobocr...@gmail.com

unread,
Oct 21, 2014, 11:46:52 PM10/21/14
to codenameone...@googlegroups.com
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
Desktop OS
Simulator
Device : Android(Samsung Galaxy S3/ 4.3)


Hi, am currently using a multipart request to post an image to a server.However, i am also adding a message parameter which takes a String from a TextArea. I have two issues with posting this request.

First, the white spaces in the message are replaced with a "+" sign on reaching the server. Using the String without encoding, works fine but i am not sure if its the right thing to do.

Secondly and more importantly,  the message can contain emoji. if it has an emoji, the request is never sent and it blocks indefinitely.This has been a major source of worry for me. Without the emoji works fine. The desired out come should be that the emoji text should be sent as contained in the message. 

Chen Fishbein

unread,
Oct 22, 2014, 7:58:34 AM10/22/14
to codenameone...@googlegroups.com, mobocr...@gmail.com
Hi,
The right thing to do would be to use the encoded version, but use a decode on your server side.




Reply all
Reply to author
Forward
0 new messages