Re: Unable to see Russian Strings in .RC file.
- From: "hughgray@xxxxxxxxxxxxx" <hughgray@xxxxxxxxxxxxx>
- Date: 14 Nov 2005 03:57:39 -0800
padmasankalp@xxxxxxxxx wrote:
> Hi,
> I have an application developed in MFC. I have an XML file to read
> the strings and load the same on the Dialogs, Buttons etc at the
> runtime depending upon the Language of the O/S. Like, my application
> shows English, Danish, Czech, Italian etc languages properly. But I
> want to support Russian Language, which is were I am facing problem. I
> found some threads and understood that since my application is not
> UNICODE i am not able to see the Russian strings and instead seeing
> garbage text. I then created a sample MFC app and included _UNICODE
> pre-processor definition in the project settings and used
> MultiByteToWideChar() to convert the strings. I am now able to see the
> Russian strings properly on the dialog. When i do the same on my
> application I am ending up getting many compilation errors, basically
> not been able to even use atoi() with CString also. I know i can change
> atoi() to wtoi() etc i.e. use the wide char methods instead of ANSII
> but its a very huge application and so it will take huge time to
> complete the conversion. So just wanted to know if there is any other
> easy method to get my job done as I cant buy much time from my client.
> Any kind of help is welcomed.
>
> Thanks in Advance.
>
> Padma
I can't see any easy way for you to do this. Unless you come up with
another solution my advice would be to convert your entire project to
unicode.
You should define both UNICODE and _UNICODE
The _T macro should be used for literal text, and functions like atoi
should be replaced with their generic equivalents, like _tstoi. There a
section in MSDN that lists all the generic text mappings. Any functions
that manipulate characters will have to be changed.
char should be replaced with TCHAR generic mapping, unless it actually
does represent a byte.
char* or LPSTR should be replaced with LPTSTR
const char * or LPCSTR should be replaced with LPCTSTR
You can continue to use CString as before, as it manages all this stuff
for you.
More info can be found at
http://www.microsoft.com/globaldev/default.mspx and in MSDN.
With some effort it's possible to convert a small to medium sized
application in a day or two. However, you might have to allocate some
time for additional testing after this.
Regards,
Hugh
.
- References:
- Unable to see Russian Strings in .RC file.
- From: padmasankalp
- Unable to see Russian Strings in .RC file.
- Prev by Date: Re: MoveFile Unicode
- Next by Date: send a message to all instances of a program on all stations
- Previous by thread: Unable to see Russian Strings in .RC file.
- Next by thread: Re: Window Service
- Index(es):