I'm trying to sent to the printer the follow command to setup the printer with code page 500, but this doesnt works for me, I need to sent this 1B 74 02 in the initialization of the raw_data. By doing this, I lose all encodings.
std::string fmtData = text;
LPBYTE buffer[6];
memset(buffer, 0x00, sizeof(buffer));
buffer[0] = (LPBYTE)0x1B;
buffer[1] = (LPBYTE)0x74;
buffer[2] = (LPBYTE)0x02;
WFSPTRRAWDATA print_data = {
WFS_PTR_INPUTDATA,
fmtData.size(),
(LPBYTE)buffer
};
wfs_execute(WFS_CMD_PTR_RAW_DATA, &print_data, TIMEOUT_WFS_CMD_PTR_RAW_DATA, wfsResult);

I discover my trouble, I was trying to do every in the same time, e.g to send text e codepage. But I can to do it separatelly and this way worked for me.
Step 1: to send codepage to the printer
Step 2: to send text