   question about unicode C++
  Hi I'm trying to output some unicode data in a file in Visual C++ 2010. I have changed the project's default character set to UNICODE.This is my code:#include <iostream>#include <fstream>#include <string>using namespace std;int main(){wofstream out(L"out.txt");out << "¡Hola!";}I get this warning: 1>main.cpp(10): warning C4566: character represented by universal-character-name '\u00A1' cannot be represented in the current code page (1253)My codepage is 1253 (Greek). But why does it rely on codepages? Isn't UNICODE supposed to free us from codepages?   
  The short version is that using Unicode means that, for the most part, your program doesn't need to worry about code pages. However, C++ source files aren't processed by your program, they're processed by the compiler and edited with the IDE and those programs do care.   ;<br />The short version is that using Unicode means that, for the most part, your program doesn't need to worry about code pages. However, C++ source files aren't processed by your program, they're processed by the compiler and edited with the IDE and those programs do care.<br /><br /><br /><br />Hello SiCrane, thank you for your answer.So I have resaved the source file with codepage 1200 (unicode), and executed the program:wofstream out(L"out.txt");out << "¡Hola!";As you can see, I have forgotten to put the L prefix in front of the hola string. However, the string is printed correctly (why?)After I noticed it, I put the L prefix in front of it, but now the inverted ! character is not shown correctly!!!--Also Japanese text is not printed neither with L nor without it.   ;  I'll probably be hated because of this but i got to speak.You just hit/introduce the biggest problem that all programers have trouble with. Everywhere i read about Unicode and related problems it is either abandoned or filled withincorrect/confusing/bizzare/incomplete information, also there is a lot "hidden/behind scene" conversion that is going on in certain API functions that can cause lot of headache,to bypass those you need to use some dirty hacks (witch also have its own drawbacks) and looking in related help reference is not much of help either, because its also incomplete.Long story short: UNICODE IS BIG PAIN IN THE ***Sorry for not being of any help.   