Hello. I need to create converter from CP437 encoding to UTF-8. Firstly, program reads file in one byte at a time. Then if its meaning is >=128 changes symbol into UTF-8.
That's what I have:
1) Function that reads file in one byte at a time:
#include <iostream>
#include <fstream>
using namespace std;
2) Function that converts decimal integer into UTF-8 symbol:
#include <iostream>
using namespace std;
int main()
{
int d;
cout<<"DEC: ";
cin>>d;
wchar_t c = static_cast<wchar_t>(d);
wcout << "UTF-8: "<< c << endl;
}
How to end it up?