I think we have a misunderstanding here.
1.) For TXT file conversion, we have used Aspose.words for Java 21.5.
com.aspose.words.LoadOptions options = new com.aspose.words.LoadOptions(); options.setLoadFormat(com.aspose.words.LoadFormat.TEXT); Document document = new Document(GZIPInputStream, options); document.save(outputStream, SaveFormat.PDF);
For text file conversion with Aspose.words, we have the above issue. (For small files, aspose is not auto-detecting the encoding of file.)
2.) For CSV file, we have used Aspose.Cells for Java 21.4 since we need the grid(column and row) structure. For this, encoding is not auto-detecting for the shared files.
TxtLoadOptions options = new TxtLoadOptions(LoadFormat.CSV); Workbook csvworkbook = new Workbook(GZIPInputStream, options); csvworkbook.save(saveLocation + fileName, pdfopts);
Kindly help us resolve this issue.
utf-8-encode.zip (766 Bytes)