By the strictest definition of "safe", no. If you try this, you're making quite a few assumptions:
1. What text encoding your text editor is saving the source in.
2. What encodings your compiler accepts and how they'll be handled, particularly regarding string literals.
3. What encoding the other string is in.
#2 is probably the most difficult one. To be honest, I have no idea what my regular compiler will do if I give it a source in non-ASCII. I find it far simpler to just not ask the question and handle special characters explicitly.