NO

Author Topic: Unicode string functions do not work correctly  (Read 2977 times)

jccddd

  • Guest
Unicode string functions do not work correctly
« on: May 20, 2010, 04:44:21 PM »
I like Polles C very much and have been working with it (v6.0) for a period of time to learn windows programming.I wrote a program to show the enviroment strings and found that the program worked well when compiled in ansi mode,but output the wrong result under the Unicode mode.What I am thinking about is that maybe it is a bug of the polles c Unicode librarys.I attached the program for the moderator to find out what's exactly going on with my program.My OS is windows 7 and I want to know when the next version(for win 7) of Polles C is going to be released.

JohnF

  • Guest
Re: Unicode string functions do not work correctly
« Reply #1 on: May 20, 2010, 05:57:59 PM »
I wrote a program to show the enviroment strings and found that the program worked well when compiled in ansi mode,but output the wrong result under the Unicode mode.What I am thinking about is that maybe it is a bug of the polles c Unicode librarys.

No bug, you need to read how to use UNICODE when using C99 rules. For example, when using UNICODE the %s specifier should be %ls.

John

jccddd

  • Guest
Re: Unicode string functions do not work correctly
« Reply #2 on: May 21, 2010, 02:01:16 AM »

No bug, you need to read how to use UNICODE when using C99 rules. For example, when using UNICODE the %s specifier should be %ls.

John


Thank you John,The problem is solved ! I did not find any clue before from the help file of polles c,I am going to read the C99 rules as mentioned carefully.