Text to binary

Greetings, all

I have a dump file that I would like to transfer to an i2c EEPROM.

I read through a tutorial on EEPROM programming on how to read and write to and from an EEPROM.

My concern is this, however:

When executing the program, I program “123 Hello, world!” and I read “123 Hello, world!” But if i am to transfer the dump file, I will need to know which encoding to use for Arduino.

If I open the dump file in Notepad++, this is what I get:

If I open the exact same file in Notepad, I get this:

And if I open the exact same file in a dump file online reader, this is what I get:

If I run any of these through a text-to-binary converter, I get the same binary strings. But do I program the Arduino with binary digits, or do I use text input, as per the EEPROM example? In which case, what encoding do I use? ANSI? ASCII?

Thank you

Your images are unreadable. Please don't post pictures of text. Just copy and paste the text.

If the text is (e.g.) "Hello" it will be the byte values 0x48, 0x65, 0x6C, 0x6C, 0x6F and you can just store those bytes as they are in the EEPROM.

Everything inside a computer is binary,


Hi, Robin

I have also included hyperlinks above each image. I tried to copy the text the first time, but the forum seems to only use the same encoding as MS Notepad.

Here they are again:



Online dump file viewer

I'm still confused: I understand that everything on a computer is binary. But do I have to convert the data to text, hex or binary in the IDE?

The dump file is in binary as shown by the offline reader. No surprise there.
Read each byte and save it to the target EEPROM as is. No conversion needed.

Thank you. I will do that.