Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between Chr$ and ChrW$

156 views
Skip to first unread message

Darin Lampson

unread,
Feb 19, 2003, 4:23:02 PM2/19/03
to
Hi,

In my app I want to create a string using Chr however since my app is being
internationalized for Chinese, French and English chr does not work. I have
looked into using Chr$ and came across ChrW$ in michka book. I have tested
both and it both seem to work fine on english, french and chinese os's.
So, I am wondering what are the differences of each and is either of these
functions the best way to create a string based on charcode?

Thanks


Michael (michka) Kaplan [MS]

unread,
Feb 19, 2003, 4:54:48 PM2/19/03
to
The book covers this topic -- Chr() creates a character based on the
default system codepage, while ChrW takes the Unicode code point
(which has nothing to do with code pages).


--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Darin Lampson" <dlam...@hotmail.com> wrote in message
news:ukZzk0F2CHA.1748@TK2MSFTNGP12...

Darin Lampson

unread,
Feb 19, 2003, 6:35:27 PM2/19/03
to
I am still confused. In your book you reccomend to use ChrW$ over Chr$/Chr
and with my tests on win 98 chinese second edition, win 2000, win XP both
act the same. I am just curious on the reason why. Just doing this kind of
operation: ChrW$(84) & ChrW$(85) & ChrW$(84) & ChrW$(70) & ChrW$(79) &
ChrW$(77)

Thanks again with your patient with me

"Michael (michka) Kaplan [MS]" <mic...@online.microsoft.com> wrote in
message news:Oj771FG2CHA.1560@TK2MSFTNGP09...

Michael (michka) Kaplan [MS]

unread,
Feb 19, 2003, 9:06:45 PM2/19/03
to
In the very low ASCII range, the default system code page and Unicode
do not change. As you go from 128 to 255 in CHr$() you will see
different results depending on that default system code page.


--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.


"Darin Lampson" <dlam...@hotmail.com> wrote in message

news:O4LH0#G2CHA...@TK2MSFTNGP11.phx.gbl...

0 new messages