OK... two things you need to do...
This line of the example is a problem:
You should change it to:
byte data = string.getBytes();
(I've changed it in the example in the wiki.)
byte data = string.getBytes("UTF-8");
I recommend never using getBytes() without specifying the encoding (and, if you specify an encoding, always specify UTF-8, since it's the only one the spec requires devices to support). Otherwise the device choses the encoding to use. It will probably choose ISO 8859 Latin 1... fine for us in Western Europe, useless in Poland... or the entire rest of the world. (More importantly, you don't know what it will choose, so you might get different results on different devices.)
Second, you might want to prefix the string (before you convert it to bytes) with a '\ufeff' byte order mark character. This will tell notepad that the file it's loading is UTF-8 and not some other encoding.
You should get something that notepad will like.
byte data = ("\ufeff" + string).getBytes("UTF-8");