I have a linux server and many clients with many operating systems. The server takes an input file from clients. Linux has end of line char LF, while Mac has end of line cha
public static String normalize(String val) { return val.replace("\r\n", "\n") .replace("\r", "\n"); }
For HTML:
public static String normalize(String val) { return val.replace("\r\n", "") .replace("\n", "") .replace("\r", ""); }