-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sys.print duplicates CR on Windows #8379
Comments
I think it must actually be |
Whoops, you're right. |
@Aurel300 Can you handle this or does someone else need to do something? |
I'm not sure there is a problem here. |
I don't find turning "\r\n" into "\r\r\n" when printing an acceptable default behavior. |
@Simn I think Hugh is suggesting just going with As much as I hate it, CRLF is a convention on Windows platforms and Oh, and of course – the fixed behaviour is already the case on the majority of sys platforms. |
Well, it is really only, and always, turning "\n" into "\r\n". This is the whole difference between fopen(name,"r") and fopen(name,"rb") - 50 years of legacy catching up with us. We most certainly do not want to explicitly add the "\r", because this does not allow is to ever get rid of them. I think the solution you are after is to set the output mode to binary (on request). |
Ok, after some discussion with @hughsando: Current systemCurrently, stdout and stderr are open in text mode on Windows. This makes PR HaxeFoundation/hxcpp#820In the PR I switched stdout and stderr to binary mode, then made We could solve this instead by adding |
I'd say it doesn't break |
Test related to HaxeFoundation#8379
* [CI] Include `sqlite.hdll` in hl test build This way it can be tested Specify sqlite version for hl * [CI] Remove bullet from hashlink build * [CI] Enable more hashlink tests * [CI] Enable a unicode test for hl and cpp Test related to #8379 * [CI] Fix php sqlite and socket tests Enable relevant packages in php config * [CI] Enable more php tests Enable php test for #5078 PHP's socket module is now enabled, so we can run socket tests * [CI] Unspecify libsqlite3-dev version for hl build Co-authored-by: Simon Krajewski <simon@haxe.org>
On OS X:
$ haxe --run Print | xxd 0000000: 666f 6f0d 0a foo..
On Windows:
Note the duplicate
0d
byte.tests/sys/src/TestUnicode.hx
The text was updated successfully, but these errors were encountered: