I'm currently working on a project that is written in C++ and uses True OLE DBGrids with a MS Access backend. This all works well until now we need to be able to convert our GUI to display Arabic characters. The DBGrids do not use Unicode so I need a way to display the characters from the database without using Unicode. Currently I have set the Regional language settings to Arabic and when I did this I can force the grids to display the Arabic characters but I can't do it through code. I need to be able to change between English and Arabic at run time. I can pull the data out of the database and then convert it to non-Unicode using the following code:
_bstr_t tmp(vHolder.bstrVal, FALSE); //wrap the BSTR
CString Caption(static_cast<const char*>(tmp)); //convert it
RetCaption = Caption;
With this I can then post the Arabic to an AfxMessageBox and it displays correctly but I can't seem to get the grids to accept the non-Unicode characters and display them correctly.
Any ideas?