Re: struct values and VC++/MFC



I'm not sure why that would happen either, in fact it shouldn't. And 'int' and 'wchar_t' are very different. There is a setting in the project properties on teh C++/Language tab that allows you to "Treat wchar_t as a built-in type", but I'm not sure would affect that.

I'm moving all of my projects to Unicode. It does use more memory for strings, but the difference in ease of maintenance is worth it in my opinion.

This article is from a older verison of VS, but it will still give you some good background:

http://www.codeproject.com/cpp/unicode.asp?df=100&forumid=524&exp=0&select=1157452

You should know about these macros if you are using MFC or ATL:

http://www.codeproject.com/cpp/unicode.asp?df=100&forumid=524&exp=0&select=1157452

Tom
"Z.K." <nospam@xxxxxxxxxx> wrote in message news:O$oyqb3lHHA.2060@xxxxxxxxxxxxxxxxxxxxxxx
Tom;

Would you happen to know of a good tutorial on unicode. I don't use it much and I still don't really understand why using unicode would interpret an int as a wchar_t.

Z.K.


Tom Serface wrote:
Hi David,

I've noticed this as well. VS 2005 tends to modify projects when converting them or creating them new to set them to use Unicode. I think this is intentional, but it has confused many people.

Tom

"David Lowndes" <DavidL@xxxxxxxxxxxxxxx> wrote in message news:pg5j43do9lb6dg2rl40kiabjevkimsq1hg@xxxxxxxxxx
>I just figured out what is going on. It appears to my new Visual >Studio
2005 that is the problem.

VS2005 projects are Unicode by default.



.



Relevant Pages

  • [PATCH] NLS: update handling of Unicode
    ... This patch updates the kernel's treatment of Unicode. ... * most commonly used characters, ... static inline unsigned char nls_tolower ... int c0, c, nc; ...
    (Linux-Kernel)
  • Re: Implicit Text to Binary Conversion
    ... The XML is Unicode once it is parsed. ... > DECLARE @docHandle int ... > (lngInstanceID, binData, intPackageCount, booGood, txtShotID, txtStatus, ...
    (microsoft.public.sqlserver.xml)
  • Re: Tranfering unicod charcters in Socket programming!
    ... You are telling about conversion b/w MBCS to Unicode. ... If this is not possible Shall I try with string to wstring ... int SendStringAsUnicode ...
    (microsoft.public.win32.programmer.networks)
  • Re: Reading Unicode Strings from File
    ... same standard as the Java unicode file. ... int major, minor, revision; ... void write_header(const struct header *hd, ...
    (comp.lang.c)
  • Re: Wide character input/output
    ... [The current message encoding is set to Unicode (UTF-8) because ... it contains Greek] ... int main{ ...
    (comp.lang.c)

Loading