I have a need to take a string, put it into a memory block, do stuff to it(encrypt it) and then finally base64Encode it, and store it in an XML file. And then of course do the whole thing in reverse.
This works, but i’m having a problem with byte order when I put the string into the memoryblock. What i’d really like is to be able to get a MemoryBlock from a string with a BOM. This is something I could write myself no problem, but I thought it’d be anice complement to the existing createStringFromData function.
My problem is if I read that XML file on the same platform its fine, but if it was created on an IntelMac and read on a PowerPC then pulling a string out of the memory block doesn’t work(these are UTF-16 strings, using simple casts to get the string in and out of the memoryblock works on the same processor, but obviously doesn’t when they are not!)