Unable to see Russian Strings in .RC file.

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

0
11/11/2005 11:22:24 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
382 Views

Similar Articles

[PageSpeed] 53

I have never used it myself, but you can try to use
setlocale (LC_ALL, "Russian");
In fact people with Russian language support set in Windows will see
your text, so maybe you don't need anything else?

0
grigsoft1 (42)
11/11/2005 1:14:06 PM
I have tried using the setlocale(LC_ALL, "Russian") method but couldnot
get the expected result. it shows junk . I have also tried calling
setlocale(LCID) method of the listbox to force the strings on the list
box. Even in that case i see garbage stuff. Please let me know if i
need to do anything else to get it right.
Thanks Again.
Padma

grigs...@gmail.com wrote:
> I have never used it myself, but you can try to use
> setlocale (LC_ALL, "Russian");
> In fact people with Russian language support set in Windows will see
> your text, so maybe you don't need anything else?

0
11/14/2005 6:03:09 AM
padmasankalp@yahoo.com 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

0
hughgray (73)
11/14/2005 11:57:39 AM
Reply:

Similar Artilces:

"Unable to Open Outlook Window"
The subject message appears on a dying Windows ME computer, after which Outlook 2002 closes. I have a new XP computer and want to transfer information to Outlook 2003 on the new one. Is there any way to recover: 1. My contacts; or 2. My E-mail settings? Thanks, Jay Parsons Yes, you should be able to search for your outlook.pst file and transfer it to your new computer. This will transfer calendar, emails, etc but not settings. I would suggest just writing down the settings. Hope this helps! -- Scott Ehardt http://www.scehardt.com "Jay Parsons" <anonym...

burn a cd of an excel file that I got from e-mail
I received an e-mail with some information that was sent in the excel spreadsheat format. I would like to burn a cd of this so I can transfer the information to another computer that has excel on it, but does not have an e-mail address. Open Email. Save attachment to your HD, select the file, copy to CD RW drive "awoosoul" <awoosoul@discussions.microsoft.com> wrote in message news:A3523896-3438-4F12-AD12-518F5A552509@microsoft.com... : I received an e-mail with some information that was sent in the excel : spreadsheat format. I would like to burn a cd of this so I can tra...

Set up was unable to install some components... on XP SP2
I saw similiar question but I am running XP SP2.I also had Money 2007 Delux installe dand running fine. I was upgrading to Money plus Deluxe. It asked about removing 2007 and I said yes as in the past upgrades everything worked fine and I was able bring in my data. This item it gave the Set was unable to install some Money componets error. I tried several times. I then went back and tried to reinstall from my 2007 Deluxe disk and it now gives me the same error. So now I am unable to run Money at all. In case anyone else has the same issue I found something in the knowledgebase about...

PST Files
I recently used exmerge to extract the email out one mailbox. (SBS 2003 ) Now as an exchange administrator I am tring to open the pst file however in cannot due to a permisions issue. How can I open the file. The orginal mailbox has been deleted. you shouldnt have chose to export permissions... now youre screwed if you dont have a backup. <mdm100@gmail.com> wrote in message news:1156881163.851865.176410@p79g2000cwp.googlegroups.com... >I recently used exmerge to extract the email out one mailbox. > (SBS 2003 ) > > Now as an exchange administrator I am tring to open t...

ost file size
I want to know of the new outlook.ost file size can support greater capacity more than 2 GB like old ones before it does crash? yes, when running against an Exchange 2000 or 2003 server. -- Neo [MVP Outlook] Due to the Swen virus, all e-mails sent to this account will be deleted w/out reading. "Mohammed Saied" <anonymous@discussions.microsoft.com> wrote in message news:074601c3bfc5$90e95860$a501280a@phx.gbl... > I want to know of the new outlook.ost file size can > support greater capacity more than 2 GB like old ones > before it does crash? thanks alot. but ...

Publisher file type #2
Am running Publisher 2000 and tried to open a file created on Publisher 2003 and "Saved as> Publisher2000". I still get the "Publisher cannot open files from a different version" message. The file is a .pub file - does that mean it is still in Publisher 2003 format? Do you have Norton? Disable "script blocking" and under options, disable "office plug-ins". -- Mary Sauer MS MVP http://office.microsoft.com/ http://www.mvps.org/msauer/ news://msnews.microsoft.com "Jon Hill" <anonymous@discussions.microsoft.com> wrote in message new...

Outlook.pst file is 2Gb and cannot be opened
I tried to open outlook this morning and was unable to. The error box said something like ... The file outlook.pst has reached it's maximum size and cannot be opened, please delete unnecessary items permanently (Shift + del) The only problem is I cannot open outlook.pst to delete any items. The size of the file is 2Gb - and I'm sure that last time (a week or so ago) I looked at the file is was 85Mb Any suggestions? TIA Daniel Well, either you have a lot of girlfriends or then just a sh!t load of spam... Goodluck on that one, my pst is around 900mbs.. >-----Original...

q; dividing a sheet into xls files
I have an excel sheet, the data is sorted by A column and A column holds three values, Patient, Caller, Doctor and that are other columns that keeps different data. How can I build a macro that exports this whole sheet in to three different files based on the values in A column. So thee files will be Patient.xls, Caller.xls, Doctor.xls You could apply data|filter|autofilter and filter by each value. Then copy the visible cells to a new workbook. Or you could just take the macro that Ron de Bruin wrote and use that: http://www.rondebruin.nl/easyfilter.htm JIM.H. wrote: > > I hav...

Duplicate Data Files in Navigation Pane
I have duplicate data files/folders in my folder list in the Navigation Pane of Outlook 2003 (with all updates) running on XP Professional again fully updated. Each entry has the same list of Calendar, Contacts, Inbox, Sent Items etc. Both folders have the same name and are identical and point to the same pst file. If I amend any entry in one, it appears in the other. E-mail arrive in both folders (as they are actually the same). One folder has the little home icon associated with it. If I try and close the non-home data file, the close option is in grey. How do I get rid of the duplica...

xls File size way too big
I am having a problem with xls file sizes. I have several virus-free files which are sized way out of proportion to their content. One file has one worksheet with 30 lines of text. No numbers, formulae, add-ins, macros etc. It is 601KB. A bigger (6 worksheets) version with similar properties is over 5MB. I have files (created earlier but not updated recently), with much more content (say, 30 times more content) which are only 75KB. What's up? How can I tame this? What should I look for? Hi Chuck! Here's two potential causes with solutions: Sometimes the size of a E...

How do I get the XmlSchema from an xml file
Hi; If an xml file has this at the top: <?xml version="1.0"?> <purchaseOrder orderDate="1999-10-20" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:/test/po.xsd"> I need to get the XmlSchema for c:/test/po.xsd. I only need it for noNamespaceSchemaLocation and I do not need to process the XML file itself, I just need the schema. I tried: XmlSchema schema = null; XmlDocument doc = new XmlDocument(); doc.Load(datasource.Url); foreach (XmlSchema xsi in doc.Schemas.Schemas()) if (xsi.Namespaces.Cou...

Filename Split, then files not found, then original file opens...
The craziest thing has started happening. When I open a file excel splits my file (path and name) on spaces and tries to open individual files of the text strings created by the split. So if I open C:\Documents and Settings\User\Desktop\file.xls If will alert: \e.xls could not be found.... then it will alert C:\Documents.xls could not be found then it alerts and.xls could not be found then Settings\User\Desktop\file.xls could not be found Then it opens the file... Very weird, and very annoying. Does anybody know how to fix this? Thanks... -Marc --- Message posted from http://www...

unable to open exchange system manager
I am running exchange 2k3 in a active/passive (win2k) cluster. After I changed the password of the domain administrator, I am unable to open ex2k3 system manager and also cluster administrator. It gives "access denied ID: c00700005" error. I also changed the permision in the registry for WINREG key in LOCAL MACHINE/Control/... etc, but that did not help. However I can open the cluster administrator from passive node. Active node is also not showing active directory objects (displays unspecified error message)when I try to assign NTFS permisions to some folders. When I run ...

Microsoft Automatic updater file
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Where is this file located? The drop down menu is there in word & excel with no functions. Has it disappeared with Snow Leopard? My version of Office is seriously running riot since 10.6.1. A manual search and upgrade to version Office 2004 11.5.4 has not restored this capability. On 10/6/09 10:39 PM, in article 59b7e0b1.-1@webcrossing.caR9absDaxw, "Nosila@officeformac.com" <Nosila@officeformac.com> wrote: > Where is this file located? The drop down menu is there in word & excel with >...

A client can't see the area she is highlighting on an excel sheet
A client I am supporting cannot see the area she is highlighting on her excel spreadsheet. It only shows up when she clicks on print preview. How does she fix this?...I have a feeling maybe her field shading in excel is the same colour as the highlighting colour of the mouse. Hi, It could be the letter color being the same as the highlighting color, go to the cell, right click on the mouse, format cells, font, see what color she have there, if the highlight color is very dark change it to white "Baercubs" wrote: > A client I am supporting cannot see the area s...

Prevent Access To already open file
Hi, I am new to excell and this forum. Is there a way of preventing someone else opening an excel spreadsheet whilst it is being edited by someonelse even read only. Regards Dave:confused: -- ashtod1 ------------------------------------------------------------------------ ashtod1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30168 View this thread: http://www.excelforum.com/showthread.php?threadid=498523 ...

Excel
I have 65 text files which I want to import into one Excel worksheet s I can run a report on the data. Is this possible -- Message posted from http://www.ExcelForum.com Hi if you're looking for a way to automatically import several text files, this posting may help you: http://tinyurl.com/35fyc Note: Excel has a row limit (65536 maximum). depending on the size of your text files you max exceed this limit Frank > I have 65 text files which I want to import into one Excel worksheet > so I can run a report on the data. Is this possible? > > > --- > Message posted from ...

Play audio files.
How do I push audio to a client PC so that it plays immediately on the client's speakers? Specifically... My server program has several audio feeds that may change from time-to-time. My client program is a simple program that allows an operator to select a specific feed from a list of many possible feeds. The selection is forwarded to the server program. When the server detects that an appropriate audio feed is present, the server streams the audio to the client PC. On the client PC, without any interaction by the user, I want the audio to begin playing immediately as soon as the b...

How to resolve this error?: "Input string was not in a correct for
I am getting the following error message when doing an import of Payables Invoices into GP using Integration Manager: "Input string was not in a correct format" Does anyone know what is causing this error and how do I resolve it? Please help. Thank you very much. ...

Creating HTML help file from within Visual C++ Build
When I created an MFC AppWizard project, Visual C++ also created a bare-bones help file for WinHelp. Whenever I build the project, VC++ compiles this help file automatically. However, I do not want to use this WinHelp help file. I have separately created a chm (HTML help) file for my application, which I would like VC++ to compile during the application build process and place in a specified directory. How do I go about: 1. Removing the default WinHelp compiling from the project? 2. Adding HTML help compiling to the project? Thanks for help Abhijit 1. I think you can remove the default help...

How to reduce Excel file size from 17.2 MB
I have a large Excel file used for financial modelling purposes - it is about 2 MB large, containing many macros. After I added three small new macros, and imported some worksheets from other Excel files I was shocked to discover the file size had increased to 17 plus MB. now my ISP won't accept it in my e-mail! How can I determine where / how to reduce the file size? I notice that when I look in my macro's that I still have the choice of choosing all open workbooks or the one currently open, as if there should be a choice even though I have only one workbook open. I must have...

Synchronizing files and VS
I work from several differnet workstations and it would be great if I could utilize the synchronize feature to make a local copy while assuring that the master copy is always up to date on the server. Has anyone done this? How does it work? The documentation seems to be targeted for web content not source files. Jeff B x-- 100 Proof News - http://www.100ProofNews.com x-- 30+ Days Binary Retention with High Completion x-- Access to over 1.9 Terabytes per Day - $8.95/Month x-- UNLIMITED DOWNLOAD Hello Jeff, On Mon, 3 Oct 2005 10:17:56 -0500, Jeff B wrote: > I work from sever...

Transfer Publisher 95 files to Publisher 98
Originally I had Publisher 95, Then later Publisher 98, Then the dreaded blue screen crash on my new computer and I lost everything. I have located most of my envelope information and addresses on floppy but they are from 95, but am having trouble getting them accross into my reloaded 98, It keeps telling me that it needs the programme that they were created in, which if 95, is long gone. Could you help please ? You can send the files to me, or if the files are mostly text, in Publisher, file, open, more files, files of type, scroll down to "recover text from any file." Publi...

Excel truncating imported file to 256 characters per cell
Hi to all I am trying to import a works database into excel. I can convert database to CSV etc but on importing to or opening in excel the text in each cell is truncated to 256 characters. If I paste 1 cell from Excel into say Word I only get 256 characters. I have researched this on the internet but cannot find the answer. I can paste and invidual cell from Works to Excell and the text is not truncated and can all be seen. I cannot bulk paste them without them being truncated What is is the solution? Database is about 300,000 cells I am using Excel from Office 97 Cheers Don Strachan...

Appending text to a file
Hello, I was wondering if CFile class can be used to append data to a file. So far when I need to add data to a file using Open and CFile::modeWrite as a parameter, whatever was in a file is overwritten by new data. I tried to introduce a new line so whenever new data is written it starts with new line, but it only erases the first line and writes on a second, here is what I have: doOpen = SomeFile.Open( szFileName, CFile::modeWrite ); CString str = "\n"; //trying to start a new line but it erases old one SomeFile.Write(str, lstr...