Message from @why am I 𝓐𝓛𝓘𝓥𝓔
Discord ID: 473822861732216844
you are reading bytes
a char is a byte
No bits were turned in reverse
Pass me the fwrite incantation you use
incantation lol
```
fwrite(mmappedData, 1, filesize, f);
```
im stealing that
Can't fuck that up lmao
mmapedData is a char* array from a mmap() command
1 is the start of the array
Give it a simple file first
compare your two files in a hex editor
ah ok sorry
one moment
instead of a text editor
to begin with
Tru
hav no idea
you probably succesfully reversed all bytes, but your text editor is interpreting it as the wrong encoding
It's plain text
How could there be an encoding fuck up
Can I force it to output plain text
that's not how files work
you output bytes
it's up to the reading program to interpret them
so then why is it ok with write, but then i cannot use that in fwrite?
because your terminal correctly displays it as ascii
gedit probably does with utf8 or something and you happened to end up in the chink codepoints
actually not utf8
but something
Can't I just take the write() output, but use that instead?
Cause the write() is completely fine
no
listen
the output is the same in raw bytes
most likely
yes
confirm this with a hex editor
xxd or whatever