473,799 Members | 2,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question on unicode and MBCS

I am working on a large project and have several modules written
compiled using MBCS. I am considering purchasing a third party library
which I understand, is compiled to support unicode strings.

Is there anyway I can work with both unicode and multi-byte C strings
(MBCS) in the same project ?
Mar 4 '07 #1
4 2509
Bit Byte wrote:
I am working on a large project and have several modules written
compiled using MBCS. I am considering purchasing a third party library
which I understand, is compiled to support unicode strings.

Is there anyway I can work with both unicode and multi-byte C strings
(MBCS) in the same project ?
Yes you can. What is it that you think will stop you?

john
Mar 4 '07 #2


John Harrison wrote:
Bit Byte wrote:
>I am working on a large project and have several modules written
compiled using MBCS. I am considering purchasing a third party library
which I understand, is compiled to support unicode strings.

Is there anyway I can work with both unicode and multi-byte C strings
(MBCS) in the same project ?


Yes you can. What is it that you think will stop you?

john
Just wasn't sure - since the two string types are not interchangeable
(i.e. without using some kind of conversion function from/to Unicode).

I was considering convert strings into the correct (i.e. expected)
format, before passing it to a method - but I just wanted to make sure
that I was not overlooking anything - or that there were no "gotchas I
was unaware of
Mar 4 '07 #3
Bit Byte wrote:
>

John Harrison wrote:
>Bit Byte wrote:
>>I am working on a large project and have several modules written
compiled using MBCS. I am considering purchasing a third party
library which I understand, is compiled to support unicode strings.

Is there anyway I can work with both unicode and multi-byte C strings
(MBCS) in the same project ?

Yes you can. What is it that you think will stop you?

john


Just wasn't sure - since the two string types are not interchangeable
(i.e. without using some kind of conversion function from/to Unicode).

I was considering convert strings into the correct (i.e. expected)
format, before passing it to a method - but I just wanted to make sure
that I was not overlooking anything - or that there were no "gotchas I
was unaware of
Yes you'd have to do the conversion yourself. Since you're programming
in Windows (I think) it has a couple of built in functions to do those
conversions.

However you should ask about them on a Windows programming group, since
we only deal with C++ language issues here.

john

Mar 4 '07 #4
On Mar 5, 7:57 am, Bit Byte <r...@your.box. comwrote:
I am working on a large project and have several modules written
compiled using MBCS. I am considering purchasing a third party
library which I understand, is compiled to support unicode strings.

Is there anyway I can work with both unicode and multi-byte C
strings (MBCS) in the same project ?
MBCS stands for multi-byte character set. In fact this is a poor
name, as it really means multi-byte encoding. The Unicode character
set can be encoded in a "MBCS" format , the most common such way is
known as UTF-8. There are other ways to encode Unicode characters,
such as UTF-16, UCS-2, etc.

If your application already supports UTF-8 then you should not have
any trouble. You should find out exactly which encoding formats this
third-party library supports. If it supports UTF-16 and not UTF-8,
for example, you may need to add a conversion function into your
application.

Mar 5 '07 #5

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

Similar topics

16
637
by: ^_^ | last post by:
conversion from: a="a"; to a=0x????; If there are many unicode strings to convert, how can I do batch-conversion?
1
2985
by: ba.hons | last post by:
Hello, first post on here so hope i dont break any rules. My problem: I have a static piece of text in arabic which i need to print out to a printer, or the screen for that matter as am not using MFC in my printing. I have read up on this all day and am SO confused now, I have read about UNICODE, MBCS etc etc some people recommend creating a CFONT
13
3695
by: mario | last post by:
Hello! i stumbled on this situation, that is if I decode some string, below just the empty string, using the mcbs encoding, it succeeds, but if I try to encode it back with the same encoding it surprisingly fails with a LookupError. This seems like something to be corrected? $ python Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) on darwin
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10488
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7567
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
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.