#include "stdafx.h"
using namespace System;
void main()
{
System::Text::Encoding^ encoding = System::Text::Encoding::GetEncoding("windows-1251"); // or cp866 ?
array<Byte>^ byteArr = gcnew array<Byte>(256);
for (int i = 0; i < byteArr->Length; ++i) byteArr[i] = i;
array<Char>^ charArr = encoding->GetChars(byteArr);
for (int i = 0; i < charArr->Length; ++i)
Console::WriteLine("{0}: {1}", byteArr[i], charArr[i]);
Console::ReadKey();
}