
Anonymous
Not applicable
2019-02-01
03:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Convert a CSV UTF-8 to UTF-8-BOM
Hello,
Please i need some help.
I have to output a CSV file in UTF-8-BOM for my client, because in UTF-8 several special caracters are not encoding as well...
In this topic, I found a routine which can encode CSV file, but not in UTF-8-BOM...
Please, somebody has a solution to this problem ?
PS: not by passing with the custom component tWriteHeaderLineToFileWithBOM
2,603 Views
- « Previous Replies
-
- 1
- 2
- Next Replies »
11 Replies

Anonymous
Not applicable
2019-02-01
11:32 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know why title of my CSV column disapear...
So i changed your tJava code for this code and it's work :
String filename = "test.csv"; String content=""; byte[] bytes = content.getBytes(); try (PrintStream w = new PrintStream(new FileOutputStream(filename))) { w.write('\ufeef'); // emits 0xef w.write('\ufebb'); // emits 0xbb w.write('\ufebf'); // emits 0xbf w.print("OptionValue,OptionName\n"); } catch (IOException e) { e.printStackTrace(); }
Thanks you again @rhall
272 Views

Anonymous
Not applicable
2019-02-01
03:28 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh I see. You raised a question about file name and row count previously didn't you? All you need to do to enable that is to put the tJava before the subjob that writes the header values. But you seem to have sorted this 🙂
272 Views

- « Previous Replies
-
- 1
- 2
- Next Replies »