Re: TCHAR string?



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@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In Visio studio -> project property, I can select Set Multibyte
character set, Set UNICODE character set or Not SET. What Multibyte
character set means here?




.



Relevant Pages

  • Re: Proposal: require 7-bit source strs
    ... >> character encodings make more sense. ... Programs that show text still need to know which character set the ... there are many non-'global' applications too where Unicode is ... I don't know Perl 6, but Perl 5 is an excellent example of how not do to ...
    (comp.lang.python)
  • Re: case-sensitivity
    ... I think that Unicode identifiers make things worse for the reasons ... a good character set standard waiting to be uncovered. ... codepoints paying particular attention to mirroring ...
    (comp.lang.scheme)
  • Re: UTF8: cgi ist staerker als ich
    ... UNICODE bzw. eigentlich UCS (Universal Character Set) ist kein Encoding, ... Ein "Character Set" definiert eine Menge von unterscheidbaren Zeichen. ...
    (de.comp.lang.perl.cgi)
  • Re: Notepad Plus - ANSI or Unicode?
    ... Unicode is a character set. ... UTF8 is the one to use. ...
    (uk.net.web.authoring)
  • Re: Notepad Plus - ANSI or Unicode?
    ... Unicode is a character set. ... UTF8 is the one to use. ...
    (uk.net.web.authoring)

Loading