473,511 Members | 15,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting from Unicode to Multibyte

Hi there,

Here's my problem, please help - I think i'm going insane :-)

I have written a DLL that returns Wide Char Unicode Chinese Strings.

I have a 3rd party Graph control (OCX) that requires Multibyte strings.

When I convert the Wide char to Multibyte, in the debugger they are

a) Seemingly random characters (with accents and stuff) if my "Regional
and Language Settings -> Standards and formats" is set to "Chinese
(Taiwan)".

b) A load of Question marks if regional settings are English.

If I send either of these to the 4rd party control, they appear as
Questions Marks.

So, basically, what is required to succesfully convert Wide Char to
Mutlibyte?

I've tried using the WideCharToMultiByte function but to no avail, what
could I be doing wrong?

Please, any help would be fantastic.

Cheers,

mat

Mar 13 '06 #1
1 4534
miner49er wrote:
Hi there,

Here's my problem, please help - I think i'm going insane :-)

I have written a DLL that returns Wide Char Unicode Chinese Strings.

I have a 3rd party Graph control (OCX) that requires Multibyte strings.

When I convert the Wide char to Multibyte, in the debugger they are

You need to consult a microsoft group. C++ really only weakly glosses
over internationalization issues. WideCharToMultibyte is a windows
call.
Mar 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
5442
by: Keith MacDonald | last post by:
Hello, Is there a portable (at least for VC.Net and g++) method to convert text between wchar_t and char, using the standard library? I may have missed something obvious, but the section on...
32
49649
by: Wolfgang Draxinger | last post by:
I understand that it is perfectly possible to store UTF-8 strings in a std::string, however doing so can cause some implicaions. E.g. you can't count the amount of characters by length() | size()....
6
5587
by: peter pilsl | last post by:
postgres 7.3.2 I store unicode-data in postgresql. The data is retrieved via webinterfaces, processed with perl and then stored in postgresql (and viceversa). All is going nice with one...
6
6596
by: John Sidney-Woollett | last post by:
Hi I need to store accented characters in a postgres (7.4) database, and access the data (mostly) using the postgres JDBC driver (from a web app). Does anyone know if: 1) Is there a...
2
11808
by: groups | last post by:
I have a C# application which needs to convert MultiByte strings to Unicode. However, I cannot get MultiByteToWideChar to behave as expected within ..net. I have declared it as follows: ...
2
4126
by: Billow | last post by:
And how about MultiByte to unicode string?
7
3233
by: Sune | last post by:
Hi! For example: 1) I want to open a file in a Chinese locale and print it. 2) The program takes the file name as a command line argument.
9
1516
by: Alex Shao | last post by:
Dear all, I have a questions about whether it is possible to use UNICODE by Standard C++. If not, Are there any libraries can be used to achieve it. Any help will be appreciated.
17
10615
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.