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: 
The Visual Studio 2015 Update 2 and later [supports setting the *execution character set*](https://blogs.msdn.microsoft.com/vcblog/2016/02/22/new-options-for-managing-character-sets-in-the-microsoft-cc-compiler/):

You can use the option `/utf-8` which combines the options `/source-charset:utf-8` and `/execution-charset:utf-8`. From the link above:

> 
> In those cases where BOM-less UTF-8 files already exist or where changing to a BOM is a problem, use the /source-charset:utf-8 option to correctly read these files.
> 
> 
> Use of /execution-charset or /utf-8 can help when targeting code between Linux and Windows as Linux commonly uses BOM-less UTF-8 files and a UTF-8 execution character set.
> 
> 
> 

`Project Properties/Configuration Properties/General/Character Set` only sets Macros Unicode/MBCS but not the *source character set* or *execution character set*.
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.