Thanks, that cleared up some confusions.(without delving into the low levels)
So, as long as everything is..say.. UTF-8 (as it is in my case), can I make a program language independent simple by maintaining a resource 'dictionary' for all the literals being used ?
But I can't understand where the encoding of the compiled executable factors into this.
Why does it matter when the other encoding is simply another data type ?
For example, shouldn't I be able to do file IO with
"basic_ifstream<char16_t>" , "basic_ofstream<char16_t>" , etc. irrespective of how the executable was made ?