function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mallesh GMallesh G 

Multibyte(Japanese Characters) file name is garbled while uploading through REST API

Hi There,
We are uploading an attachment using REST API, we have given the filename in Japanese character (UTF-8), have mentioned the Character Set as UTF-8 also, but when it reaches the Salesforce it is garbled.

Is there any other way to upload UTF-8 characters as part of file upload.


Thanks,
Mallesh
Mallesh GMallesh G
User-added image
Mallesh GMallesh G
Here are the request values and file name in the Salesforce Site. Any information is much appreciated
Mallesh GMallesh G
Here are request values and file name in the Salesforce site. ANy informatin is much appreciated.
noriko oshimanoriko oshima
Hi mallesh.
you must encode japanese charactor.

Apex class, has EncodeUtil class,
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_restful_encodingUtil.htm

JavaScript has encodeURI method.
http://www.w3schools.com/jsref/jsref_encodeuri.asp

Best regards.
(sorry... I'm not native english.. so maybe my words in fault..)