Your script has this:
use(1, $item[Newbiesport\231 tent]);
The actual name of the item is "Newbiesport™ tent".
Apparently, some systems are able to parse that original as a trademark symbol and some are not. I'm not sure what this has to do with writing items to maps, since your script doesn't do that. But I'll agree that if we read an item, we should probably normalize the name so that if you DO write it to a file, it will have the expected character entities and will be readable on any system.
Not that that would help with the strangely encoded character embedded right in the script, as in this case.