Symbol problems in Word 2004 for mac

J

John McGhie [MVP - Word and Word Macintosh]

Hi Klaus:

Silly me, I believed the Help :)

Chr Function

Returns a String containing the character associated with the specified
character code.

Syntax Chr(charcode)
The required charcode argument is a Long that identifies a character.

Remarks
Numbers from 0 - 31 are the same as standard, nonprintable ASCII codes. For
example, Chr(13) returns a linefeed character. The normal range for charcode
is 0 - 255. However, on DBCS systems, the actual range for charcode is
-32768 to 65536.

Note The ChrB function is used with byte data contained in a String.
Instead of returning a character, which may be one or two bytes, ChrB always
returns a single byte. The ChrW function returns a String containing the
Unicode character except on platforms where Unicode is not supported, in
which case, the behavior is identical to the Chr function.

Visual Basic for the Macintosh does not support Unicode strings.
Consequently, ChrW(n) cannot return all Unicode characters for n values in
the range of 128-65,535, as it does in the Windows environment. Instead,
ChrW(n) attempts a "best guess" for Unicode values n greater than 127.
Therefore, you should not use ChrW in the Macintosh environment.

Cheers

Yes :) ... in Word2004.


ChrW and AscW are VB(A) string stuff (nothing to do with Word) and work
flawlessly even in Word X.
If something goes wrong, Word has messed up the character, and you'd need to
look at the rest of the code to see what happened.

You may find even Word X is better than you assume. Say,
Selection.InsertAfter ChrW(i)
will insert the "proper" Unicode character. The only problem I saw is that
Word might not be able to display the character (and shows an underscore).

Greetings,
Klaus

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
P

Paul Berkowitz

Visual Basic for the Macintosh does not support Unicode strings.
Consequently, ChrW(n) cannot return all Unicode characters for n values in
the range of 128-65,535, as it does in the Windows environment. Instead,
ChrW(n) attempts a "best guess" for Unicode values n greater than 127.
Therefore, you should not use ChrW in the Macintosh environment.

And this is correct.

Klaus, it's not true that Word X can insert the correct Unicode character
for all values 128-65535. When there's a Mac "International" character that
corresponds (West European with diacritics, Central European, Cyrillic,
about 15,000 Chinese-Japanese-Korean characters [only], a few others) it
will do so. When there isn't, you get that underscore. I think you may see
the Unicode character if you the bring the doc over to WinWord: the encoding
is in place. But it's not inserting the character in Word X.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
K

Klaus Linke

Hi Paul,

That's exactly what I said (perhaps not as clearly as you).

Regards,
Klaus

Paul Berkowitz said:
Visual Basic for the Macintosh does not support Unicode strings.
Consequently, ChrW(n) cannot return all Unicode characters for n values in
the range of 128-65,535, as it does in the Windows environment. Instead,
ChrW(n) attempts a "best guess" for Unicode values n greater than 127.
Therefore, you should not use ChrW in the Macintosh environment.


And this is correct.

Klaus, it's not true that Word X can insert the correct Unicode character
for all values 128-65535. When there's a Mac "International" character that
corresponds (West European with diacritics, Central European, Cyrillic,
about 15,000 Chinese-Japanese-Korean characters [only], a few others) it
will do so. When there isn't, you get that underscore. I think you may see
the Unicode character if you the bring the doc over to WinWord: the encoding
is in place. But it's not inserting the character in Word X.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
You may find even Word X is better than you assume.
Say, Selection.InsertAfter ChrW(i)
will insert the "proper" Unicode character. The only problem
I saw is that Word might not be able to display the character
(and shows an underscore).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top