How to map a user local string (using OS code page) to UTF-8 and vice-versa in C or C++?

Hi

How to map a user local string (using OS code page) to UTF-8 and vice-versa
?
I need send strings between clients and a server (the clients can be linux
or windows) and I am thinking in use UTF-8 to change text.

What happens if I change a chinese text to UTF-8, send it to the server that
locale is english ?

Leandro Gustavo Biss Becker


0
7/16/2004 8:34:29 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
571 Views

Similar Articles

[PageSpeed] 47

Reply:

Similar Artilces:

How to get TASK_ID field for summary tasks without using Project.a
I know for tasks which are not summary tasks we can get TASK_ID field using statusing web service. But i could nto find any other options than Project web service to get TASK_ID field for summary tasks and the top level project task. Problem of using Project web service is that in my custom sharedpoint web part where we are using PSI web services we get all the data required using Resource and Statusing web service for the logged in resource. But Statusing web service retrieves TASK_ID only for actual tasks and not for summary tasks. Now just to get TASK_ID of summary tas...

String Table (VC6 IDE)
I have strings in English language in the "String Table" of my project (myProject.rc). I'm loading them using: CString msg; msg.LoadString(150); Now, I need to internationalise my app. How can I do that? How can I add support for multiple languages? Which is the best way to do that? >I have strings in English language in the "String Table" of my project >(myProject.rc). I'm loading them using: > >CString msg; >msg.LoadString(150); > >Now, I need to internationalise my app. How can I do that? How can I add >support for multiple lang...

Users asked to enter Username / Password /Domain when opening outl
Just this morning, our users are being asked for their username / domain and password. When we eneter it in, the box reappearas after we eneter it again we get and error that the information store could not be opened. We are running Exchanage 5.5 with Windows 2000. Any help would be great. Thanks in advance =?Utf-8?B?SmVmZg==?= <Jeff@discussions.microsoft.com> wrote in news:DD28037B-B6C8-4575-B0CC-F80C14991716@microsoft.com: > Just this morning, our users are being asked for their username / > domain and password. When we eneter it in, the box reappearas after we > eneter...

2007
Project desktop expert, new to Project Server 2007 and working with a sandbox implementation currently. When I use the PWA Build Team...Replace to replace a generic resource on a project with an actual named resource after first publishing a plan, my updates don't appear to be reflected in Project Server. If I check out and open the Project Plan in MSP Pro, however, the updates were made, and then if I publish the schedule, the updates appear in server. I thought when you made resource updates using PWA that they should be reflected immediately (or as soon as the request...

CListBox strings not showing up
Hi all I'm using Microsoft Visual C++ .NET (1.1) So I create a dialog window, draw a simple CListBox, create the variable (m_listbox), then do: m_listbox.AddString("hello!"); UpdateData(FALSE); but nothing shows up. Only until I click where "hello!" should be, is the text visible. So that means I inputted correctly, but there must be some aspect I'm missing. It's probably pretty nooby, but help? Hello, Since you are accessing the control directly, remove the call to UpdateData(FALSE). UpdateData(FALSE) updates (or synchronizes) the controls in the dialog...

Error Code: 0x8024D007
Hi all: I have tried pretty much evrything listed here in other discussions. It appears that my last update was January 2010. I am running XP sp3. I would hope by now Microsoft would have a general fix for WUS issues. I know this is a compllex issue but so many people can no longer get updtaes. is this their way of trying to force us all to Win 7? Any help would be appreciated. Thx Michael Michael, The most common cause of error 0x8024D007 is that registry files that correspond to the Wups2.dll file are missing. However, the problem can also be caused by other mis...

Developing a robust database at one co. then using it at another c
Are there any legal implications of using the type of database listed above to perform similar functions for another company? The 2 company's are in 2 totally different industries and the new database will have to be modified to fit the requirements for the industry it is in. The database was developed at the old company. there is no such thing as a robust Jet database. Move to SQL Server if you want to build a solution that will work for the next decade. Jet is and always has been depecrated On Apr 7, 12:14=A0pm, BoaMan10 <BoaMa...@discussions.microsoft.com> w...

Report Detail section coding
Is there a way I can know when the detail section of report moves to the first record of a new group. Something like..... If Me.DetailSection.BOF Then I am using Access 2007 Any help is always appreciated. Thanks, Wally wallymeister wrote: >Is there a way I can know when the detail section of report moves to the >first record of a new group. Something like..... > >If Me.DetailSection.BOF Then > >I am using Access 2007 Add a text box to the detail section and set its expression to =1 and RunningSum property to Over Group. The value of the te...

Permissions is not allowing me to use my print preview.
Help! Don't understand My Permission in Excel. Even though I unrestrict, it still doesn't allow me to Preview my documents. How do I reset? Please Help, ...

keeping page, insert etc dropdowns open & having page below it
how can i keep the drop downs open & have the page below it. It was that way & I must have hit the wrong button or something.microsoft word 2007 "billy" <billy@discussions.microsoft.com> wrote in message news:91198FA1-A43C-4A00-9141-FB019528AC5B@microsoft.com... > how can i keep the drop downs open & have the page below it. It was that > way > & I must have hit the wrong button or something.microsoft word 2007 Ask in a discussion group for Word. Here's how to find it. http://www.microsoft.com/communities/newsgroups/en-us/ In the...

Question on multiple NICs used by Exchange 2003
I have a requirement to bind four virtual SMTP servers to unique IP addresses. The server has four NICs and each IP address is uniquely bound to a virtual SMTP server. I used telnet to confirm that the appropriate virtual SMTP server responds to each assigned IP address. In case you are wondering why I did not use virtual IP addresses- Per Microsoft, the virtual IP address schema will not satisfy our requirement that the same IP address be used for sending (relaying) the e-mail that received it. Their recommendation was to have a NIC for each virtual SMTP server. The problem that I am ex...

Any way to load VB persistence in C++?
I've re-written an old VB6 ActiveX control in C++ as a COleControl, duplicated all its properties and functionality, and taken over its old CLSID and ProgID. Now I'm looking for a way to load the old persisted properties in the new C++ control. Our container supports an ASCII persistence mode which implements IPropertyBag. In this mode, the properties that the VB control wrote out via PropertyBag.WriteProperties map right in to my new control's DoPropExchange PX_blah methods. In binary mode though, when CreateControl( ) winds its way down to my DoPropExchange, all the PX_blah me...

Calling the Page Setup PopUp from VBA..
Hello.. I am using Access 2003 and I have a button on my form that I will have the user click to bring up the Page Setup popup screen just like you would do if you chose File -> Page Setup. Does anyone have the VBA code to accomplish this? Please advise... Cheers! Brett Try, docmd.RunCommand acCmdPageSetup Also, do not forget to trap error 2501 should the user cancel the operation. -- Hope this helps, Daniel Pineault "Brett Davis" wrote: > Hello.. > > I am using Access 2003 and I have a button on my form that I will have the > user click to br...

How to use AjaxToolKit in asp.net for DHTML Editor
Dear Sir/Madam Please tell me how to use AjaxToolKit dll for DHTML purpose using C#. Thanks in Advance "Deep" <vinodkus@gmail.com> wrote in message news:7ac633e9-2cbd-4417-9b4e-363a9b5b3e74@d27g2000yqf.googlegroups.com... > Please tell me how to use AjaxToolKit dll for DHTML purpose using C#. http://tinyurl.com/ybfuqo8 ...

=?Utf-8?Q?Inter-org_migration_=E2=80=93_resource_m?= =?Utf-8?Q?ailbox_move_strategy?=
Does anyone have any experiences or points of reference on how to co-ordinate the movement of user mailboxes, calendars and resource mailboxes etc that ‘collaborate’ with each other in a inter-org migration? Keeping directories between the two Orgs up to date and synchronized is okay, but is there any easy way to find and list those users that have access to other mailboxes, calendars, and resource mailboxes (that are assign rights through groups to other mailboxes for example?). Any comments and thoughts would be appreciated! Mikey. ...

How do I create a summary page from multiple worksheets
Trying to roll-up information from multiple worksheets within the same workbook to a summary page. These worksheets are copies of each other. For example: each worksheet has a column labeled "defect number". The users can record multiple defect numbers within a cell (e.g. 897, 992, 1001) So sheet1, row1 = 897, 990 sheet2, row1 = 992 sheet3, row1 = 995, 1001, 1012 sheet4, row1 = empty How do I (or can I) rollup this information to a summary page where sheet5 is the summary worksheet and row1 = 897, 990, 992, 995, 1001, 1012. Here's what I have so far [=Sta...

Using the classes created with xsd.exe
I have created classes from several xsd files. These files create about 150 classes and spot checking them they do represent types in the xsd files. the question is how do I use these files. How do I load data into them and create xml from them. Is there some articles about this subject. Thank you, -- Jerry Hi Jerry, As for the classes you've generated, are they normal classes or dataset classes? As for the normal classes you generated through xsd.exe, you can use XML serialization to convert those class instances into XML content or deserialize the XML content back into objec...

IN EXCEL, WHEN I CLICK ONA SINGLE CELL It HIGHLIGHTS WHOLE Page
please help Hi maybe: http://www.mvps.org/dmcritchie/excel/ghosting.txt -- Regards Frank Kabel Frankfurt, Germany "confused" <confused@discussions.microsoft.com> schrieb im Newsbeitrag news:36180425-96C2-4368-9DE0-3E60741154FF@microsoft.com... > please help Just click on a cell and nothing else? Or perhaps you mean click on a cell then as you move the cursor around other cells are selected like the cursor is stuck? If the former, you must have some event code which selects the cells or you are clicking on the gray box at intersect of rows and columns(top left above ro...

Access violation in CDaoQueryDef::Open or CSimpleStringT::GetLength(). VC++ 6.0 app compiled in Visual C++ .NET
Hi, I have a problem using DAO in Visual C++ .net Standard edition. We have an old project created in Visual C++ 6.0 Professional. The projects compiles, links ok (with a lot of warnings telling the DAO-classes are deprecated). The compiled program executes ok until I am about to access the database. Some accesses goes ok, but some are not. It is always the same databse accesses that the program crashes on. The database that I'm using is Access 97. I also have tried converting it to 2000 and 2002. In this function the crash occurs in daocore.cpp: void CDaoQueryDef::Open(LPCTSTR lpszName...

mapping keystroke to a cell
I would like to map a keystroke to a cell and have it add up the number of times the keystroke has been applied. For instance if I touched the A key 3 times it would give me the value of 3 in one cell. If I touched the B key 2 times it would give me the value of 2 in another cell. I'm thinking of using this in a laboratory situation. Where I could count the different types of blood cells under a microscope using the keyboard. Once I reached a total of a 100 diffent types of cells it would play a .wav file that would alert me that the count of 100 had been reached. Using a differ...

Reminders coming back after offline use
I have a user who uses Outlook on his laptop, but when he is out of the office he accesses mail through OWA. Every time he comes back in the office he says he gets inundated with old reminders popping up. And when you click on "Dismiss" you get an error that says, "conflicting edits have been made to the same item..." and there are duplicates of the event. I looked at this today and noticed that there is an event with the original date and the duplicate was showing a last-edited date of last Thursday. I asked if anything unusual happened last Thursday and he said he pro...

Paging Size set up for sql 2005 best performance
erver windows 2003 sp1. 64 bits, Paging file size for selected drive C is (custom selected) Initial 2046 MB, and maximum 4092 MB. It is currently allocated 4081 MB. Computer RAM memory is 8GB. Server functions as a database MS SQL 2005 server, and it is used under heavy insert database operations The problem is that it can be seen on windows task manager there is on PF usage and Page File Usage hHstory around 8.2 GB paging file size not 4081 GB as it is given on virtual memory page set up. DoleBludger (DoleBludger@discussions.microsoft.com) writes: > erver windows 200...

How to merge columns and rows into one cell besides using Merge and Center Icon?
I had posted this question before, but I couldn�t find this thread in any of the pages up till page 17. So I�m posting again. I want to merge all rows and columns starting from A1 to J2, with no lines in between into one cell. My text data value are in D1 and D2 respectively. Using Merge and Center Icon will only retain the upper-left most data, resulting the data in D2 to be deleted. So how to merge all rows and columns into one cell and yet prevent the data in D2 to be deleted? Any help will be greatly appreciated. ------------------------------------------------ ~~ Message posted from h...

Virus Outbreak by using SMTP virtual server
Hi, The client was accidentally open approved-password.zip file then the nightmare began to spread out. It will use "system administrator" and "webmaster" as sender to inform the user that their password is grant or deny. Today, it tried to send out as NDR style. I assumed the virus on the workstation is using our smtp server. Will there a log that SMTP virtual server may generate so I can keep cross reference such as workstation or username so I can pinpoint? Any suggestion or recommendation will be appreciated. I am currently using Trend Micro Offican or Scan...

Using MFC dll from non-MFC application
I have been struggling several weeks with this problem. I need to call an MFC dll from a non-MFC application. The MFC dll was originally a working MFC program that I conveted to a dll. The dll works fine except that it crashes when I exit. Can anyone provide me with some snippets of working code showing how you did this? An example of the calling code, the CWinApp (or at least the InitInstance) and the hook function would be great. I have read several times that this should be easy to do, so I am probably just missing a simple line somewhere. The way I created my dll is to use to ...