Hi people!
My .NET utility AjGenesis is a code generation tool. The compiled binaries runs without glitches under Ubuntu 10.x, and Mono. But I have a problem: generating a java text file (a normal text file for my tool) it generates Byte Order Mark at the beginning of each file. I'm using System.Text.Encoding.Default: in Windows, all OK, in Ubuntu, the Byte Order Mark are three bytes, indicating UTF8, I guess.
This difference is a problem, when I want to compile the generate .java files using ant, or javac, the BOMs generate errors. Then:
- What encoding to use in Ubuntu/Mono so the generated files could be processed by javac?
- I tried javac -encoding UTF8 without success, any clues? My guess: it's not for skip BOMs.
- I tried System.Text.Encoding.ASCII. But my generated files have non ASCII files (Spanish accented letters). If I change the encoding, the BOMs are added, and javac refuses the files. Any suggestion?
TIA