Opening this from Linux works, and the pattern updates whenever the file updates.
However, on Windows, I can't get Golly to read this file, which makes it slightly inconvenient.
Any advice would be thankful. Thanks.
Scorbie wrote: October 24th, 2019, 3:09 amOpening this from Linux works, and the pattern updates whenever the file updates.
However, on Windows, I can't get Golly to read this file, which makes it slightly inconvenient.
Very odd! I can't duplicate this immediately. With Golly 3.3 on Windows 10 I can Open From Clipboard the text in the code box, or save it and Open it, or change the line endings to Linux-style line endings and it still opens without any apparent damage.
I seem to remember having run into some strange behavior with mixed line endings, though. Can you attach a sample file that won't open for you on Windows, instead of quoting it?
Scorbie wrote: October 24th, 2019, 3:09 amOpening this from Linux works, and the pattern updates whenever the file updates.
However, on Windows, I can't get Golly to read this file, which makes it slightly inconvenient.
Very odd! I can't duplicate this immediately. With Golly 3.3 on Windows 10 I can Open From Clipboard the text in the code box, or save it and Open it, or change the line endings to Linux-style line endings and it still opens without any apparent damage.
I seem to remember having run into some strange behavior with mixed line endings, though. Can you attach a sample file that won't open for you on Windows, instead of quoting it?
Thank you! Here's the file, and I can reproduce the behavior:
Scorbie wrote: October 26th, 2019, 7:26 amHere's the file, and I can reproduce the behavior...
Yup, that clears things up pretty well. Every other byte is an ASCII zero, pretty much:
Hex-listing-for-output-rle-file.png (48.9 KiB) Viewed 5248 times
So this is a UTF-16 little-endian Unicode text file. Find out why your code is saving data in that format instead of plain ASCII, and the mystery will be solved.
Please tell me when you figure it out. Maybe this is an encoding that will be showing up more and more often now -- e.g., maybe Python 3.x produces it it some circumstances? -- and we should figure out how to support it better in Golly. You're right that Golly doesn't open that file, either with or without the leading byte-order mark (FF FE). I just get a single ON cell at (0,0), either way. But when I copy and paste the text out of TextPad and into Golly, it works just fine.
Aha, thank you for clearing that up. Hopefully we won't be seeing that format often, as it was generated from C++ search code using `std::cout`. I'll try to find out how to make that code utf-8 - friendly. Thank you very much!!
Edit: a quick google search seems to reveal that on Windows, `std::cout` will tend to output UTF-16 in most circumstances, so I guess I'll stop using that...
Edit2: I think my terminal's code page was cp65001 (Windows' emulation of utf-8) Piping the output to `iconv -f cp65001 -t utf-8 -o output.rle` worked, but then the windows code page somehow became cp949, which somehow solved the problem by letting me not need the piping thing.
Anyway this could be useful for future reference, so just writing it down.