RUNNING A PROGRAM

This sketch does not write anything to the hardware serial port, and you've told us nothing about what is connected to pins 8 & 9.

Step back from the problem - just write a sketch that initialises and prints something to the hardware serial port and confirm that it uploads and runs correctly on both platforms

At the moment it's impossible to guess whether you're chasing a bug in your code causing it to not do what you intend, or a problem such as pasting MBCS source code into an IDE that expects ASCII.