I have a created text file in unix enviroment using java code.
For writing the text file i am using java.io.FileWriter and BufferedWriter. and for newline after each row i am using bw.write("\r\n") method. (where bw is object of BufferedWriter) and sending that text file by attaching in mail from unix environment itself to other environments like(mainframe,windows)
My issue is, if my client's download the text file in Mainframe system, they found that in text file a "special character"(like small rectangular box) presenting and data not properly aligned.
bw.write("\r\n") is not working i think so..(but working fine in windows).
I want same text file alignment as it is in unix environment and without any special
character symbol too, if they opened the text file in mainframe ,windows environments
or any other enviroments.
How to resolve the problem. Thanks for your help in advance.
pasting my piece of java code here for your reference..(running java code in unix
environment)
File f = new File(strFileGenLoc);
BufferedWriter bw = new BufferedWriter(new FileWriter(f, false));
rs = stmt.executeQuery("select * from jpdata");
while ( rs.next() ) {
bw.write(rs.getString(1)==null? "":rs.getString(1));
bw.newLine();
}