//---------------------------------------------------------------------------
#pragma hdrstop

#include "stdafx.h"

#include "Printer.h"

//---------------------------------------------------------------------------
//#pragma package(smart_init)
//---------------------------------------------------------------------------
typedef unsigned int uint4;
//---------------------------------------------------------------------------
std::string TransformCode(std::string str)
{
	for(uint4 i=1;i<=str.length();i++)
	{
		switch(str[i])
		{
			case 'À': str[i]=(char)0x80; break;
			case 'Á': str[i]=(char)0x81; break;
			case 'Â': str[i]=(char)0x82; break;
			case 'Ã': str[i]=(char)0x83; break;
			case 'Ä': str[i]=(char)0x84; break;
			case 'Å': str[i]=(char)0x85; break;
			case '¨': str[i]=(char)0xF0; break;
			case 'Æ': str[i]=(char)0x86; break;
			case 'Ç': str[i]=(char)0x87; break;
			case 'È': str[i]=(char)0x88; break;
			case 'É': str[i]=(char)0x89; break;
			case 'Ê': str[i]=(char)0x8A; break;
			case 'Ë': str[i]=(char)0x8B; break;
			case 'Ì': str[i]=(char)0x8C; break;
			case 'Í': str[i]=(char)0x8D; break;
			case 'Î': str[i]=(char)0x8E; break;
			case 'Ï': str[i]=(char)0x8F; break;
			case 'Ð': str[i]=(char)0x90; break;
			case 'Ñ': str[i]=(char)0x91; break;
			case 'Ò': str[i]=(char)0x92; break;
			case 'Ó': str[i]=(char)0x93; break;
			case 'Ô': str[i]=(char)0x94; break;
			case 'Õ': str[i]=(char)0x95; break;
			case 'Ö': str[i]=(char)0x96; break;
			case '×': str[i]=(char)0x97; break;
			case 'Ø': str[i]=(char)0x98; break;
			case 'Ù': str[i]=(char)0x99; break;
			case 'Ú': str[i]=(char)0x9A; break;
			case 'Û': str[i]=(char)0x9B; break;
			case 'Ü': str[i]=(char)0x9C; break;
			case 'Ý': str[i]=(char)0x9D; break;
			case 'Þ': str[i]=(char)0x9E; break;
			case 'ß': str[i]=(char)0x9F; break;
			case 'à': str[i]=(char)0xA0; break;
			case 'á': str[i]=(char)0xA1; break;
			case 'â': str[i]=(char)0xA2; break;
			case 'ã': str[i]=(char)0xA3; break;
			case 'ä': str[i]=(char)0xA4; break;
			case 'å': str[i]=(char)0xA5; break;
			case '¸': str[i]=(char)0xF1; break;
			case 'æ': str[i]=(char)0xA6; break;
			case 'ç': str[i]=(char)0xA7; break;
			case 'è': str[i]=(char)0xA8; break;
			case 'é': str[i]=(char)0xA9; break;
			case 'ê': str[i]=(char)0xAA; break;
			case 'ë': str[i]=(char)0xAB; break;
			case 'ì': str[i]=(char)0xAC; break;
			case 'í': str[i]=(char)0xAD; break;
			case 'î': str[i]=(char)0xAE; break;
			case 'ï': str[i]=(char)0xAF; break;
			case 'ð': str[i]=(char)0xE0; break;
			case 'ñ': str[i]=(char)0xE1; break;
			case 'ò': str[i]=(char)0xE2; break;
			case 'ó': str[i]=(char)0xE3; break;
			case 'ô': str[i]=(char)0xE4; break;
			case 'õ': str[i]=(char)0xE5; break;
			case 'ö': str[i]=(char)0xE6; break;
			case '÷': str[i]=(char)0xE7; break;
			case 'ø': str[i]=(char)0xE8; break;
			case 'ù': str[i]=(char)0xE9; break;
			case 'ú': str[i]=(char)0xEA; break;
			case 'û': str[i]=(char)0xEB; break;
			case 'ü': str[i]=(char)0xEC; break;
			case 'ý': str[i]=(char)0xED; break;
			case 'þ': str[i]=(char)0xEE; break;
			case 'ÿ': str[i]=(char)0xEF; break;
		}
	}
	return str;
}
//---------------------------------------------------------------------------
CPrinter::CPrinter()
{
}
//---------------------------------------------------------------------------
CPrinter::~CPrinter()
{
}
//---------------------------------------------------------------------------
