Im reading in a document that the user uploads from the visualFlow:
<apex:inputFile value="{!contentFile}" filename="{!nameFile}" id="file"/>
And its accessed in apex in this manner:
String nameFile = contentFile.toString();
And it works like a charm. I am able to parse through the document and extract all the information needed, but only for English users. But for Spanish users that's not the case.
Those files have some special characters, and cause a BLOB is not a valid UTF-8 string
error.
I've tried to base64Encode
the file contents, but the results come out illegible.
String nameFile= EncodingUtil.base64Encode(contentFile);