
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to convert csv file into ascii format
Hi,
I have a requirement, given below.
I need to create a file (csv file) by fetching data from a DB and that csv file I need to send to another server. Client on other server requires this file in ASCII format.
Please help me.
By default Talend supports ISO and UTF-8 encoding.
1. How to convert this file into ASCII
2. If I convert this file into ASCII (some how), will each record of this will appear on next line automatically?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- field separator (,) OK
- line separator ( \r\n) Warning they said "Carriage return", not "Carriage return + Line feed" - the answer doesn't make sens, they should have said "Line feed" or "Carriage return + Line feed" (carriage return on old typewriters or printers represents the head movement to the left side of the machine, but not to the next line which is drived by line feed - doesn't make sens when speaking about files, right?)
- field enclosure (Not mentioned, hope it is not required) OK
- character encoding (They mentioned in ASCII) Go with UTF-8 or ask them

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you please give us a sample data including the input and the expected outpout.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi TRF,
Below are the sample data,
name,tenure
Vibin Talend 1,1.0
Lijo Talend 1,1.0
Mash Talend 1,1.0
John Talend 1,1.0
It is nothing but fetch some records from a db to create a csv file. That need to send as it is, but it should be in ASCII format, because client needed in ASCII format.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ASCII is not a file format, it's a character encoding format (like EBCDIC for example).
So, I understand your input but what is the expected output?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi TRF,
I have littile knowledge about encoding.
As per my understating (based on the requirement from client), the output file should be csv format and ascii encoded. Hope it will not change the data format while creating the file.
Could you please tell me how to achieve this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
few more queries,
1. will utf-8 encode help in the above case?
2. will it help If I mention 'ASCII' in custom encoding?
please help me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ASCII encoding is the default (as soon as you're not working on a old mainframe).
Ask your client for the expected:
- field separator (; or other)
- line separator (\n or \r\n)
- field enclosure ("" or other or nothing)
- character encoding (UTF-8, ISO-8859-1 or other)
The most standard (or simple) CSV files have the following settings:
- ";" for the field separator
- "\n" for the line separator
- nothing for the field enclosure
- UTF-8 for the character encoding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi TRF,
Below is the reply from client,
The file will be in ASCII format consisting of variable length fields. A comma separates each field and there is no comma after the last field in a record. Records are terminated with a carriage return character. The extract file will terminate with a carriage return character.
which summarized below,
- field separator (,)
- line separator ( \r\n)
- field enclosure (Not mentioned, hope it is not required)
- character encoding (They mentioned in ASCII)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- field separator (,) OK
- line separator ( \r\n) Warning they said "Carriage return", not "Carriage return + Line feed" - the answer doesn't make sens, they should have said "Line feed" or "Carriage return + Line feed" (carriage return on old typewriters or printers represents the head movement to the left side of the machine, but not to the next line which is drived by line feed - doesn't make sens when speaking about files, right?)
- field enclosure (Not mentioned, hope it is not required) OK
- character encoding (They mentioned in ASCII) Go with UTF-8 or ask them

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Does this solve your case?
If so, mark the best solution.
Kudos also accepted.
