Re: TCHAR string?
- From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
- Date: Fri, 6 Jan 2006 10:30:05 +0900
Multibyte means that each character contains one or more bytes. Most characters are two bytes long but a few are one byte long. Different countries or regions developed different encoding standards before Unicode ever existed. ASCII means one particular country's national standard, and that particular country's standard only uses single-byte characters. In most countries there are still tons of databases, programs, and other files conforming to long-standing standards, you have to check which code page is in use, and character-by-character you have to check whether it's a single-byte character or double-byte character.
"Jonathan Wood" <jwood@xxxxxxxxxxxxxxxx> wrote in message news:OA14vdjEGHA.2544@xxxxxxxxxxxxxxxxxxxxxxx
Multibyte means ASCII characters, or single-byte characters. I know the name is very misleading. There are situations where some characters can take more than one byte and that is why it has that name.
Basically, multibyte means one byte per character and Unicode means two bytes per character. Note that Unicode builds work best on Windows NT and later but may not run on Win95/95/ME.
When you use TCHAR, LPCTSTR, etc. and define your string constants using _T("Here's a string"), your strings will be ASCII when you do a multibyte build, and they'll be Unicode when you do a Unicode build. This is convenient because, otherwise, you'd need to modify all your string and string pointers when switching between the two builds.
-- Jonathan Wood SoftCircuits http://www.softcircuits.com Available for consulting: http://www.softcircuits.com/jwood/resume.htm
"kathy" <yqin_99@xxxxxxxxx> wrote in message news:1136491523.052753.253490@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIn Visio studio -> project property, I can select Set Multibyte character set, Set UNICODE character set or Not SET. What Multibyte character set means here?
.
- Follow-Ups:
- Re: TCHAR string?
- From: Jonathan Wood
- Re: TCHAR string?
- References:
- TCHAR string?
- From: kathy
- Re: TCHAR string?
- From: Ajay Kalra
- Re: TCHAR string?
- From: kathy
- Re: TCHAR string?
- From: Jonathan Wood
- TCHAR string?
- Prev by Date: Re: CAsyncsocket derived class being run as a thread
- Next by Date: Re: Dangerous behavior of CString
- Previous by thread: Re: TCHAR string?
- Next by thread: Re: TCHAR string?
- Index(es):
Relevant Pages
|
Loading