Hello Ranchers! I'm trying to make a program to read from a file and for each line in the file substitute space charachters (1 or more ("\s+")) with 1 tab ("\t"). Then the line is written to a new file. The class works fine on my xp laptop with Eclipse at home, while it writes just little squares in the output here at work, with a w2000 pc using Netbeans. Input file contains ascii characters. Some ideas? here you are the class. Thank you! Gianni
Hi , I am a newbie So hope this solution works for you. bwr.write("\n"); Here the \n character needs to be \r\n because this is the character that works in most situations as a line break. One more thing did not understand how System.out.println(tabString); will write to the output file. I was wondering if you also need to add this bwr.write(tabString);
Let me know if this solution works
posted 13 years ago
Hi, As a safer bet instead of using bwr.write("\n"); or bwr.write("\n"); try this for better compatibility across OSs bwr.newLine();
I didn't do it. You can't prove it. Nobody saw me. The sheep are lying! This tiny ad is my witness!