Closed jjYBdx4IL closed 8 years ago
Didnt check, but I guess the output encoding is according to the environment, too, then. UTF-8 + UNIX LF should be the way to go nowadays.
BTW nice work. And about time someone continues that great library.
Well the encoding can be provided in the FileCodeWriter
constructor so no action needed here. By default the system encoding is used and I don't want to change this.
A simple work around for all existing releases is to set the system property line.separator
to the correct separator (e.g. System.setProperty ("line.separator", "\n");
) before writing stuff out.
JCodeModel.setBuildingCharset (Charset)
and JCodeModel.setBuildingNewLine (String)
should do the trick for you. Please verify and let me know if it works. If yes, I will build a new release.
Works. Nice. TY!
Release 2.8.2 is out and soon on Maven central
For obvious reasons I don't want the generated java source code files to be dependent on where I execute the codemodel code. Please give me an option to set the lineSeparator manually or always use UNIX lineSeparators. TY!