> Note that the key word here is "Windows", not "OCaml".
why is that?
why is that?
I'm not well versed in windows as to say if this was a clever way to solve the problem of console output, or if it was a really old hack that just now received some care and attention.
For almost every other system, the obvious code (fopen(argv[1], ...), basically) does the right thing. On Windows you have to enter some crazy non-portable parallel universe where not even the signature of main() is the same.
That's the reason why many programs don't support Unicode on Windows, despite there often being no reason for those programs to care about character encoding at all.