[Servingxml-help] how to confiure the encoding on fly
Brought to you by:
danielaparker
From: Ye, X. (CORP) <Xiu...@ad...> - 2016-01-14 02:02:09
|
All; Our application need to save a CSV file either with encoding ANSI or UTF, it depends on the client which has a special characters on the CSV file We configured serving xml using <sx:flatFile ref="employeeImportCSVFile"/> <sx:defaultStreamSource encoding="Windows-1252"/ </sx:flatFileReader> But we noticed that only works for CSV file saved as ANSI with a special character. IF we have to saved a CSV file as UTF-8, it does not work correctly for BOM Then we are trying to configured it as fly based on Charset we detected on CSV file We use following API, chrset depends on the input CSV file But it does not work either, can anyone have any idea about this? defaultStreamSource = new FileSource(inputFile, charset); doTransform(defaultStreamSource, serviceName, resourceFileName, out, servingXMLLogger); thanks, aLeaner ---------------------------------------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, notify the sender immediately by return email and delete the message and any attachments from your system. |