>I've just noticed an odd thing happening on Japanese roms.
>
>FldWordWrap() is treating a "(" as a break between words.
>
>If I attempt to wrap the text "testing testing testing testing(testing)"
>with a width wide enough to display the first 4 "testings", it gets
>wrapped this way on an English rom:
>
>testing testing testing
>testing(testing)
>
>But on a Japanese rom, it gets wrapped like his:
>
>testing testing testing testing
>(testing)
>
>Is that the correct behavior?
Yes.
>If so, why is it different on Japanese
>vs English? Both tests were done with 4.0 roms.
They use different tables to define the wrapping behavior. The
specific reason it's this way for Japanese is:
a. Single-byte and double-byte versions of ASCII characters should
wrap the same.
b. With double-byte ASCII, often there is no space character between
an alphabetic and leading punctuation character, since the full-width
(double-byte) leading punctuation glyphs typically have lots of white
space to the left.
So you wind up with the wrapping behavior you observed.
We could try to completely harmonize the behavior of Latin &
Shift-JIS wrapping for single-byte characters that occur in both
character sets, but keeping the Latin wrapping behavior as-is means
that it's less complex, and thus faster.
>A related question, why are there no (c) and (r) characters in the
>PalmSJIS encoding?
Because it's based on CP932, which is based on Shift-JIS, which
doesn't have these characters. So I guess you'd have to ask the Japan
Industrial Standards body about the omission.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/