I've found a weird issue with outputting wide chars in Visual Studio 2012 which I've narrowed down to the following code.
fputws(L"Hello World\n", stdout); // Throws Access Violation exception
This throws an exception when run.
If I add a simple fputs in front it works fine.
fputws(L"Hello World\n", stdout); // Now this works.
Other wide char output functions seems to work just fine:
std::wcout << L"Hello world" << std::endl;
Also, the crash doesn't appear in Visual Studio 2008 or Visual Studio 2010. This can be confirmed by opening a Visual Studio 2010/2008 Command Prompt and compile and run the test file.