Passionate developer in Java and Scala. And sometimes, something else. A few months per year, someone calls me "professor". CoFounder of Scala By The Lagoon @scalagoon
In 2005, I was working on a B2B website that was expected to produce a .INI file for a portable WinCE terminal (think an intelligent barcode reader).
The output file was correct. But the terminal wouldn't read it.
I checked it visually, line by line, with a working file: the text was the same, after all there was little syntax that could be broken. Opened in a text editor, the two files were identical; diff output was empty.
After a couple of days of headbanging, in a desperate move I opened a working and a non-working file with an hex editor.
An saw, at the beginning of the file: FFFE vs FEFF
Try spotting that difference after 2 days of staring at the screen. That's Big Endian UTF BOM vs Little Endian one. The terminal was a Little Endian ARM, and wanted its text encoded that way. The server was a Big Endian linux on x86, if I remember correctly; an IBM WebSphere, no less.
The solution was a one-liner, adding "UnicodeLittle" in the output stream creation.
Worse time spent/solution size ratio in my carreer, as of now.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
In 2005, I was working on a B2B website that was expected to produce a .INI file for a portable WinCE terminal (think an intelligent barcode reader).
The output file was correct. But the terminal wouldn't read it.
I checked it visually, line by line, with a working file: the text was the same, after all there was little syntax that could be broken. Opened in a text editor, the two files were identical; diff output was empty.
After a couple of days of headbanging, in a desperate move I opened a working and a non-working file with an hex editor.
An saw, at the beginning of the file: FFFE vs FEFF
Try spotting that difference after 2 days of staring at the screen. That's Big Endian UTF BOM vs Little Endian one. The terminal was a Little Endian ARM, and wanted its text encoded that way. The server was a Big Endian linux on x86, if I remember correctly; an IBM WebSphere, no less.
The solution was a one-liner, adding "UnicodeLittle" in the output stream creation.
Worse time spent/solution size ratio in my carreer, as of now.