[Note: I should mention the joke here is on me. The strings were in fact in little endian format. I just don’t know how to read a debugger.]
Its time for my geek humor corner. Technically this entire blog could be considered geek humor (sans the humor), but bear with me now. This is quite amusing, I assure you. Assuming, of course, you have a CS or EE degree and you are easily amused. I know for one that I fall into that catagory.
If you don’t, I’m sure its ok. God probably still loves you anyway.
Anyway, I’m working on porting a Mac/PowerPC application to Mac/Intel. As any geek worth his weight in Cheetos knows, that means dealing with big endian vs little endian issues. The problem I was looking at had to deal with strings of text. I’m looking at the string in the debugger, and everything looks fine. So I decide to actually to view the string as raw memory.
Well now. That’s funny. In a “that’s going to ruin my entire day” sort of way.
Silly me, here I was on a little-endian machine thinking I’d see little-endian string. But that’s where I’d be wrong. I was now staring at a big-endian string (a string literal built by the compiler, no less).
I guess you had to be there.