(Msg. 1) Posted: Fri May 30, 2008 5:22 am
Post subject: Higher Unicode characters Archived from groups: microsoft>public>word>printingfonts (more info?)
Sorry about all the questions, but I figured it would be easier to have all
my Unicode inquiries under oen roof! This way, uninterested parties can just
skip the one post...
Can someone explain something regarding unicode? Or, if such an explanation
were to be too involved, point me toward web ressources to help me
understand.
I have to work with documents written in Simplified/Traditional Chinese (by
the way, I heard that simplified is Mandarin and that Traditional is
Cantonese.... why not use Mandarin and Cantonese?), Korean, Japanese and
Hebrew.
Occasionally, when exchaning documents with other co-workers, it happens
that one person cannot open a document because Word reports that it cannot
read the characters and it pops up the Unicode conversion dialogue box. I
have never been able to use that dialogue box to succesfully convert
characters... Whenever I see that dialogue, I pretty much know that the
document has become useless. So, why would a document saved in Word by one
person become unreadable for another person also using Word?
Also, once the characters have been written, why is it that applying a font
will not work? If there are characters in Simsun, the only way I can change
font is use another "Chinese-compatible" font, like PMingLiu. I mean, I
understand that Verdana may not be able to render Chinese characters, but if
I apply Verdana to Simsun, I would expect to see white squares instead of the
characters. But no, Word will not even apply the font. However, I can apply
Simsun to Roman characters previously formatted with a non-Chinese font, like
Arial.
I am not sure that these will appear, but here goes 4 Chinese characters
(Simplified Chinese):
飞机票价 (air fare)
The third one is unicode 31080 as repoted by the AscW function.
Anywhere in a Word document, regardless of the font at the current insertion
point, if I do ALT+3180, I get 票 in Simsun. Why don't I get the Arial version
of unicode 31080 (Assuming Arial ws the current font at the insertion point)?
Why do I get "h" in this Web inbterface instead of 票 when I do ALT+31080?
Finally, when using the AscW function, why is the reported Unicode number
often a negative one? The first of the four character is Unicode 39134 but
AscW reports that it is -26402. Why can't the VBA compiler add 65536 to get
the proper answer? I have not found any reference to negative code on
http://www.unicode.org/charts/, so why does the AscW report useless
information?
(Msg. 2) Posted: Sat May 31, 2008 3:16 pm
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Hi Jean-Guy,
Can't answer everything... Just some parts.
As to the last question:
> Finally, when using the AscW function, why is the reported Unicode number
> often a negative one? The first of the four character is Unicode 39134 but
> AscW reports that it is -26402. Why can't the VBA compiler add 65536 to
> get
> the proper answer? I have not found any reference to negative code on
> http://www.unicode.org/charts/, so why does the AscW report useless
> information?
Basically, VBA hasn't the proper type of integers (unsigned double-byte) for
Unicode, so it fudges along using signed two-byte integers.
If you work with Unicode, you're usually better off using hex notation
anyway, and both Hex(39134) and Hex(-26402) will give you the same hex code
(98DE).
The other way round, you also have an easier time using hex notation
(iCode=&H98DE instead of iCode=39134).
(Msg. 3) Posted: Sat May 31, 2008 3:45 pm
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
The answers below are more or less guesswork, since I haven't seen a good
"official" documentation yet...
> Also, once the characters have been written, why is it that applying a
> font
> will not work? If there are characters in Simsun, the only way I can
> change
> font is use another "Chinese-compatible" font, like PMingLiu. I mean, I
> understand that Verdana may not be able to render Chinese characters,
> but if I apply Verdana to Simsun, I would expect to see white squares
> instead
> of the characters. But no, Word will not even apply the font.
If you insert some characer that isn't available in the current font, Word
will choose a font that does contain the character.
At least most times ... sometimes it'll continue to use the Latin font and
show a square.
It depends on what language support is currently installed, probably also on
which fonts are installed, probably also on whether a font for Asian text
(or BiDi... text -- see below) is already defined for that run of text, or
for that style, maybe on other things too.
If it does use another font: which font that'll be seems to depend on two
things...
First, Word looks at the code and determines whether it's Western, Asian,
BiDi (Hebrew/Arab), Thai ...
Now say it's an Asian character, and there's already an Asian font defined
for that style, or for that run of text, it'll use that font.
You can see what font that will be using
? Selection.Font.NameFarEast
If you get "Times New Roman" or some other font that doesn't contain FarEast
characters, no Asian font has been set yet.
In that case, it seems to look through the list of available Asian fonts and
pick one at random.
At least I'll often end up with a lot of different Asian fonts if I insert
exotic characters willy-nilly (MS Mincho, SimSun, Arial Unicode MS...).
> However, I can apply Simsun to Roman characters previously formatted
> with a non-Chinese font, like Arial.
The large font (SimSun... ) has all the Latin (Western) characters, so Word
does not see any problems applying it (or to continue using that font if you
type in some Western text following the Asian character).
> I am not sure that these will appear, but here goes 4 Chinese characters
> (Simplified Chinese):
>
> 飞机票价 (air fare)
>
> The third one is unicode 31080 as repoted by the AscW function.
> Anywhere in a Word document, regardless of the font at the current
> insertion
> point, if I do ALT+3180, I get 票 in Simsun. Why don't I get the Arial
> version
> of unicode 31080 (Assuming Arial ws the current font at the insertion
> point)?
Because Arial does not contain that glyph.
> Why do I get "h" in this Web inbterface instead of 票 when I do ALT+31080?
Most non-Unicode apps do a "Modulo 256" on Unicode characters.
They can't insert the Unicode character, so they'll just use the lower of
the two bytes:
(Msg. 4) Posted: Sat May 31, 2008 3:49 pm
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
> Occasionally, when exchaning documents with other co-workers,
> it happens that one person cannot open a document because
> Word reports that it cannot read the characters and it pops up the
> Unicode conversion dialogue box. I have never been able to use
> that dialogue box to succesfully convert characters... Whenever I
> see that dialogue, I pretty much know that the document has become
> useless. So, why would a document saved in Word by one
> person become unreadable for another person also using Word?
Not sure, and I haven't seen that message yet.
I'd make sure "Arial Unicode MS" is installed on all machines. It contains
every Unicode character (in Unicode Version 2, which is all Office supports
AFAIK).
That way, the machine should be able to deal with any character you throw at
it.
In the Office setup, it's somewhere under "Office common features >
International support > Universal font" or something like that.
(Msg. 5) Posted: Mon Jun 02, 2008 5:32 am
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Klaus Linke" wrote:
> Hi Jean-Guy,
>
> Can't answer everything... Just some parts.
>
> As to the last question:
> > Finally, when using the AscW function, why is the reported Unicode number
> > often a negative one? The first of the four character is Unicode 39134 but
> > AscW reports that it is -26402. Why can't the VBA compiler add 65536 to
> > get
> > the proper answer? I have not found any reference to negative code on
> > http://www.unicode.org/charts/, so why does the AscW report useless
> > information?
>
> see Jay's and my replies to Dave Rado at the end of this thread:
> http://groups.google.de/group/microsoft.public.word.word97vba/browse_t...ad/thre >
> Basically, VBA hasn't the proper type of integers (unsigned double-byte) for
> Unicode, so it fudges along using signed two-byte integers.
> If you work with Unicode, you're usually better off using hex notation
> anyway, and both Hex(39134) and Hex(-26402) will give you the same hex code
> (98DE).
> The other way round, you also have an easier time using hex notation
> (iCode=&H98DE instead of iCode=39134).
I guess somebody was in a hurry to wrap up the VBA library, so they rounded
some corners!
(Msg. 6) Posted: Mon Jun 02, 2008 5:40 am
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Klaus Linke" wrote:
> The answers below are more or less guesswork, since I haven't seen a good
> "official" documentation yet...
>
Well, it is very good guess work!
I did install all complex/Far-East modules that come with Windows and
Office. So, as you state, Word as all the info it needs to make "intelligent"
guesses...
Sometimes, MSFT has messed things up when trying to make Word "Intelligent"
(Like, try applying "Do not spell check" from the langugae dialogue... Most
of the time, Word turns it back on right away..), but in the case of handling
Unicode, I guess they did a good job, at least as far as the UI is concerned.
(Msg. 7) Posted: Mon Jun 02, 2008 5:51 am
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
"Klaus Linke" wrote:
> > Occasionally, when exchaning documents with other co-workers,
> > it happens that one person cannot open a document because
> > Word reports that it cannot read the characters and it pops up the
> > Unicode conversion dialogue box. I have never been able to use
> > that dialogue box to succesfully convert characters... Whenever I
> > see that dialogue, I pretty much know that the document has become
> > useless. So, why would a document saved in Word by one
> > person become unreadable for another person also using Word?
>
> Not sure, and I haven't seen that message yet.
>
> I'd make sure "Arial Unicode MS" is installed on all machines. It contains
> every Unicode character (in Unicode Version 2, which is all Office supports
> AFAIK).
> That way, the machine should be able to deal with any character you throw at
> it.
>
> In the Office setup, it's somewhere under "Office common features >
> International support > Universal font" or something like that.
Thanks for the tip...
I did find it in the Office Shared features, but I need the installation CD,
which I do not have at work... Now I have to call the IT people to get them
to install that feature... But they know me now... I keep calling for them to
install stuff on my machine... The first of which was the VBA help files
which were not installed by default where I work...
(Msg. 8) Posted: Tue Jun 03, 2008 5:00 pm
Post subject: Re: Higher Unicode characters [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
I'd actually prefer KISS (keep it simple, stupid)...
-- Only one font.
-- Squares (or better placeholders with the code, as on the Mac) if a
character is missing.
-- A possibility to find such missing glyphs.
If I'd really need different fonts for different languages, I'd rather use
different (character/paragraph) styles, than have Word choose fonts
depending on character and/or language.
Probably a matter of taste, but I'm annoyed several times every day because
Word has applied some (Asian) font behind my back.
Klaus
"Jean-Guy Marcil" wrote:
> "Klaus Linke" wrote:
>
>> The answers below are more or less guesswork, since I haven't seen a good
>> "official" documentation yet...
>>
>
> Well, it is very good guess work!
>
> I did install all complex/Far-East modules that come with Windows and
> Office. So, as you state, Word as all the info it needs to make
> "intelligent"
> guesses...
>
> Sometimes, MSFT has messed things up when trying to make Word
> "Intelligent"
> (Like, try applying "Do not spell check" from the langugae dialogue...
> Most
> of the time, Word turns it back on right away..), but in the case of
> handling
> Unicode, I guess they did a good job, at least as far as the UI is
> concerned.
>
> Thanks for your time.
All times are: Eastern Time (US & Canada) (change) Goto page 1, 2, 3
Page 1 of 3
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum