Question: I have a requirement in office online 365 in which following things are needed.

1. Calendar list with custom field "Events", type is choice (General,Marriage,Birthday)
2. Need to create a dropdown in which above field's value should bind.
3. When user select "General" then only General events should display, birthday and marriage should not display.
4. Main thing view should be only calendar and I have tried sharepoint list filter and list view webpart but calendar view is not supported.

Any help would be appreciated.

Answer: 
AFAIK, VC++ doesn't have a commandline flag to let you specify a UTF-8 execution character set. 
However it does (sporadically) support the undocumented

```
#pragma execution_character_set("utf-8")

```

referred to [here](http://connect.microsoft.com/VisualStudio/feedback/details/773186/pragma-execution-character-set-utf-8-didnt-support-in-vc-2012).

To get the effect of a commandline flag with this pragma you can write the pragma in a header
file, say, `preinclude.h` and pre-include this header in every compilation by passing
the flag `/FI preinclude.h`. See [this documentation](http://msdn.microsoft.com/en-us/library/8c5ztk84.aspx) 
for how to set this flag from the IDE.

The pragma was supported in VC++ 2010, then forgotten in VC++ 2012, and is supported again
in VC++ 2013
Credit on @user3998276 's answer and the great experiment.

The conclusion tells me a lot

* when meet L"string", wide string:

	+ compiler first detects the cpp-file-encoding, then:
		- Unicode--> just use utf-16 // may here also has a conversion, like u8 to u16.
		- ACP--> convert the Unicode string to ACP
* when meet "string", ordinary string literal:

	+ compiler first detects the cpp-file-encoding, then
		- Unicode --> covert the Unicode character to ACP character
		- ACP --> just read the source file according ACP

As to your problem, I think the 'insertion operations on db tables' is just a 
call to the **db insertion** API. So, all you need to do is to organize the command, like SQL, in UTF8. Once the API can understand your command, it can write the right value(imagine binary steam) for you. 

Try:

* In c++11 and later, you can specify utf-8 string by prefix 'u8', like

`u8"INSERT INTO table_name (col1, col2,...) VALUES (v1, v2,....)"`

<http://en.cppreference.com/w/cpp/language/string_literal>

* Use a third-party string wrapper, like QString from QT. 

First wrap your SQL to QString, then it can be easily convert to utf8, `QByteArray x = mySql.toUtf8()`. The
QByteArray is just 'array of byte', so you can static\_cast it to the type the **insertion API** wants.

Again, read the answer of @user3998276 carefully, you may need to change the encoding of your cpp file to Unicode if there are some character cannot be represent in you ANSI code page.