NetPositive-CJK
OVERVIEW
Allows you to browse Chinese/Japanese/Korean web pages with
NetPositive. Supports traditional Chinese (Big-5), simplified Chinese
(EUC-CN) and Korean (EUC-KR) as well as built-in Japanese support.
CJK version of StyledEdit and the xtou command are also included.
CAUTION: THIS IS A QUICK-N-DIRTY HACK, AND VERY EXPERIMENTAL.
TRY AT YOUR OWN RISK.
REQUIREMENTS
- BeOS R4.5/R5 x86/PowerPC
- NetPositive 2.1, 2.2, 2.2.1, 2.2.2, 3.0d3
- CJK TrueType fonts (Unicode-encoded .TTF file)
INSTALLATION
- Install your favorite CJK TrueType fonts. Japanese fonts
(e.g. "Haru" in BeOS5-Japanese.zip) could be used for Chinese too but
they usually lack many Chinese characters (especially simplified) that
are used in Chinese text.
Refer to here for font availability.
FreeBSD ports collection also has a few CJK TrueType fonts.
- Close running NetPositive if any.
- Double-click install.sh to install NetPositive-CJK, StyledEdit-CJK and xtou-cjk.
- Run "NetPositive-CJK" in "Applications".
- Open "Edit | Preferences | Display" and assign your fonts to
"Japanese", "Korea" and "Chinese" encodings.
- Open "View | Document Encoding" and select appropriate encodings.
- "Chinese (Big-5)" for traditional Chinese
- "Chinese (EUC-CN)" for simplified Chinese
- "Korean (EUC-KR)" for Korean
- "Japanese (Auto Detect)" for Japanese
Some CJK web sites about BeOS:
UTILITIES
StyledEdit-CJK is the CJK version of StyledEdit.
You can choose CJK encodings in the "Encoding" menu when you "Open" or "Save As".
xtou-cjk is the CJK version of the xtou command.
$ xtou-cjk -t big5 utf8_document.txt
$ xtou-cjk -f euccn euc_cn_document.txt
NOTES
- The page title in the yellow title bar is drawn in your system font (not NetPositive's font).
If it doesn't have enough characters, titles may be garbled.
- If you frequently travel among CJK pages, it's a good idea to open a
NetPositive-CJK window for each locale.
- You cannot use Cyrillic and Greek encodings.
They are sacrified for Chinese and Korean support.
- There is a bug that NetPositive-CJK sometimes eats all CPU power.
Quit NetPositive-CJK in that case.
If you find the reason and/or solution please let me know.
- HZ is automatically decoded under EUC-CN mode.
However, HZ is often rendered incorrectly in HTML text
as it conflicts with HTML metacharacters.
TECHNICAL NOTES
This section contains implementation details about this package.
Average users don't have to read it.
This package consists of libtextwrappers.so and
patches to NetPositive and xtou.
The patches make the application link dynamically with
libtextwrappers.so instead of libtextencoding.so,
and modify convert_to/from_utf8() calls to wrapper_to/from_utf8().
libtextwrappers.so provides wrapper_to/from_utf8(), which does Chinese and Korean code conversion by itself and
delegate other encodings to original convert_to/from_utf8() in libtextencoding.so.
This idea is inspired by NetPositive-K.
Currently libtextwrappers.so maps encoding schemes as follows:
constant | original | mapped
|
---|
B_ISO5_CONVERSION | Cyrillic (ISO 8859-5) | Chinese (Big-5)
|
B_KOI8R_CONVERSION | Cyrillic (KOI8-R) | Chinese (EUC-CN)
|
B_MS_WINDOWS_1251_CONVERSION | Cyrillic (Windows 1251) | Chinese (HZ)
|
B_MS_DOS_866_CONVERSION | Cyrillic (MS-DOS 866) | (reserved)
|
B_EUC_KR_CONVERSION | Greek (ISO 8859-7) | Korean (EUC-KR)
|
Although libtextencoding.so in fact provides EUC-KR conversion (B_EUC_KR_CONVERSION),
I had to make my own because it seems rather incomplete and causes NetPositive to crash in some Korean web pages
(e.g. Internet Hangul Mail FAQ).
In addition, although EUC-KR conversion is already assigned to B_EUC_KR_CONVERSION,
I had to map ISO 8859-7 also to EUC-KR simply because NetPositive has no EUC-KR entry in "Document Encoding".
REFERENCES
- Lee Sang-Won,
NetPositive-K
- Unicode Consortium,
"The Unicode Standard, Version 2.0",
Addision Wesley
- Ken Lunde,
"CJKV Information Processing",
O'Reilly
- Nadine Kano, "Developing International Software for Windows 95 and Windows NT", Microsoft Press
- Lee Fung Fung, "HZ - A Data Format for Exchanging Files of Arbitrarily Mixed Chinese and ASCII characters", RFC 1843
- Wei et al., "ASCII Printable Characters-Based Chinese Character Encoding for Internet Messages", RFC 1842
- "The Be Book",
Be, Inc.
LICENSE
This package is freeware.
Copyright (C) 2000 ITO, Takayuki. All rights reserved.
HISTORY
- 0.10
-
First release as NetPositive Chinese Kit.
Big-5 and EUC-CN supported.
Tested with BeOS R5 x86, NetPositive 2.2.
- 0.20
-
Fixed Big-5 table.
Ported to BeOS R4.5.2 PowerPC, NetPositive 2.1.1.
Fixed installer and uninstaller bugs.
- 0.30
-
Renamed to NetPositive-CJK.
EUC-KR and HZ supported.
HTML doc.
Fixed Big-5 a bit again.
- 0.40
-
StyledEdit and NetPositive 3.0d3 supported.
- 0.41
-
Workaround for NetPositive crash on some Korean pages.
- ToDo
-
Chinese/Korean support for BeMail/mail_daemon, Mail-It.
AUTHOR
ITO, Takayuki
(e-mail/
web)
I cannot understand Chinese nor Korean. Contact me in Japanese,
English, French or Latin. :-)