HaxeFoundation / HaxeFoundation/haxe

Sys.print duplicates CR on Windows

Open
#8,379 10 comments 0 reactions 1 assignee Claimed by @Aurel300 View on GitHub
bug platform-cpp platform-hl
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
class Print {
public static function main():Void
Sys.print("foo\r\n");
}
```

On OS X:

```bash
$ haxe --run Print | xxd
0000000: 666f 6f0d 0a foo..
```

On Windows:

```bash
$ haxe --run Print | hexdump -C
00000000 66 6f 6f 0d 0d 0a |foo...|
00000006
```

Note the duplicate `0d` byte.

- [x] eval (fixed in #8135)
- [ ] cpp (HaxeFoundation/hxcpp#820)
- [ ] hl (HaxeFoundation/hashlink#264)
- [ ] (once fixed) disable workaround marked with this issue number in `tests/sys/src/TestUnicode.hx`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.