You cannot use the EncodingUtil methods to move documents with non-ASCII characters to Salesforce. You can, however, download a document from Salesforce. To do so, query the ID of the document using the API query call, then request it by ID.
The following are methods for EncodingUtil. All methods are static.
public static Blob convertFromHex(String inputString)
Type: Blob
Each byte in the Blob is constructed from two hexadecimal characters in the input string.
The convertFromHex method throws the following exceptions.
Blob blobValue = EncodingUtil.convertFromHex('4A4B4C'); System.assertEquals('JKL', blobValue.toString());
public static String convertToHex(Blob inputBlob)
Type: String
public static String urlDecode(String inputString, String encodingScheme)
Type: String
This method uses the supplied encoding scheme to determine which characters are represented by any consecutive sequence of the from \"%xy\". For more information about the format, see The form-urlencoded Media Type in Hypertext Markup Language - 2.0.
public static String urlEncode(String inputString, String encodingScheme)
Type: String
This method uses the supplied encoding scheme to obtain the bytes for unsafe characters. For more information about the format, see The form-urlencoded Media Type in Hypertext Markup Language - 2.0.
String encoded = EncodingUtil.urlEncode(url, 'UTF-8');