Since 1993, Unicode has had a specific codepoint for a fullwidth Yen sign.
Likewise, MacJapanese has separate kuten codes for halfwidth and fullwidth
Yen signs. But mbstring mapped _both_ Yen sign codepoints to the
MacJapanese fullwidth Yen sign.
It's probably more appropriate to map the 'ordinary' Yen sign to the
MacJapanese halfwidth Yen sign. Besides, this means that the conversion
between Unicode and MacJapanese is closer to being lossless and reversible.
s1 |= 0x8080;
} else if (c == 0xa0) {
s1 = 0x00a0;
- } else if (c == 0xa5) { /* YEN SIGN */
- s1 = 0x216f; /* FULLWIDTH YEN SIGN */
+ } else if (c == 0xa5) { /* YEN SIGN */
+ /* Unicode has codepoint 0xFFE5 for a fullwidth Yen sign;
+ * convert codepoint 0xA5 to halfwidth Yen sign */
+ s1 = 0x5c; /* HALFWIDTH YEN SIGN */
} else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */
s1 = 0x2140;
}