Universal Code Convertor is part of NJStar Communicator. It converts between different encodings of Chinese, Japanese and Korean text. It can be used as a Chinese Code Converter, Japanese Code Converter, Korean Code Converter, Unicode Converter and CJK to GIF converter. Due to its unique design and a host of powerful functions, we decide to dedicate this separate section to explain and explore its various usages/functions. Universal Code Converter can be used interactively via GUI, or used for batch processing via command line.
Graphic User Interface
NJStar Universal Code Converter provides a simple and easy to use user interface.
Universal Code Converter can be devided into two major parts - the upper portion displays the contens of the clipboard and/or conversion results; the lower portion allows user to specify the conversion task and options.
1. Input/Output Codes
NJStar Universal Code Converter supports following CJK encodings:
- GIF - Picture in GIF format (only for output)
- CNA - Chinese Auto Detect (only for input code)
- GB - Chinese GB2312
- GBK - Chinese GBK (including GB2312)
- GB2 - Chinese GB18030-2000
- B5 - Chinese Big5
- B5H - Chinese Big5 with HKSCS 2004 Extension
- CNS - Chinese CNS 11643-1986/1992
- HZ - Chinese GB-HZ (GB2312 in 7 bit encoding)
- JPA - Japanase Auto Detect (only for input code)
- EUC - Japanese EUC-JIS
- SJS - Japanese Shift-JIS
- JIS - Japanese New-JIS or ISO-2022-JP
- KSC - Korean KSC
- KSX - Korean KSC with Unified Hangul code
- JOH - Korean Johab encoding
- DBX - DBCS/MBCS Hex
- PYN - Pinyin Number
- PYT - Pinyin Tone
- EAC - EACC CJK encoding as used in Library System
- UCS - Unicode UCS2/UTF16
- UCB - Unicode UTF16-BE
- UT8 - Unicode UTF8
- UT7 - Unicode UTF7
- IDN - Unicode IDN (such as xn--6kry05bgnc.com)
- RTF - Unicode RTF (such RTF created by Word 2000/XP or above)
- UHT - Unicode HTML (such as 南)
- UCX - Unicode UCS4/UTF32 Hex (such as \u6975\u661f, U+6975, \x6975, 0x6975)
2. Options
- "Clipboard Text" vs "Text in File(s)"
- By default, "Clipboard Text" conversion option is used, which allows user to convert the Windows clipboard contents from source code to output code selected in the lower portion (see above picture).
For example, to copy simplified Chinese text from a web page to Notepad on Windows 98:- copy Chinese text from web browser;
- open up Universal Code Converter;
- select "Unicode UCS2" as Input Code, and "Chinese GB" as Output Code; then click "Convert Clipboard" button;
- open Notepad, and select "Edit", "Paste" to paste GB Chinese text into Notepad.
- If you select to use "Text in File(s)", you can use Universal Code Converter to perform batch conversion from file(s) instead of from clipboard.
- By default, "Clipboard Text" conversion option is used, which allows user to convert the Windows clipboard contents from source code to output code selected in the lower portion (see above picture).
- Add Spaces / Remove Spaces:
This option allows you to add a space (or remove all spaces) between CJK characters.
- Wrap Text: Allows you to pre-wrap long CJK sentences. It is designed to fix double-byte CJK text corruption due to line-break problem.
- Strip HTML Code: This option allows you to strip all HTML tags in a web page document for easy reading.
- Fix Corrupted Text: This option is designed to fix multi-byte CJK corruptions automatically.
- Simplified Chinese / Traditional Chinese: Designed to allow conversion between simplified and traditional Chinese for "Unicode" such as Unicode RTF and Unicode UCS2.
When the input-code is one of the Chinese codes and the output-code is Unicode, GBK, UTF8, UTF7 or Unicode RTF, you can specify whether you want to use simplified or traditional Chinese. If neither is specified, the Convertor will use setting implied by the input code. For example, if input is GB, the output will be in simplified Chinese.Example: To convert Microsoft Word file between simplified and traditional Chinese:
- Highlight the whole document in Word, then do a 'Copy';
- In Universal Convertor, select Unicode RTF both as input and output codes;
- Select 'Simplified Chinese' or 'Traditional Chinese' option;
- Press 'CONVERT' to convert
- Now in Word, do a paste to have converted document.
-
HKSCS PUA Options: Click this item to open the follow dialogbox. It allows you to conctrol how the HKSCS characters are stored in relation to the Unicode Private User Area (PUA) when converting HKSCS code to Unicode.
- From PUA to Unihan and CJK Ext. A+B: Move all HKSCS out of PUA into standard Unicode code points.
- From Unihan and CJK Ext. A+B to PUA: Move all HKSCS from standard Unicode code points to PUA.
- From CJK Ext. A+B to PUA: Move only those HKSCS in Unicode Ext. A and B to PUA.
- From CJK Ext. B to PUA: Move only those HKSCS in Unicode Ext. B to PUA.
- [More Options]
If the output-code is "GIF Picture", this button displays a dialog box for user to specify text color, background color of the picture, and the lines per page setting.If the output-code is "Japanese Shift-JIS", this button displays a dialog box for user to specify whether the half size Katakana should be used in the output.
Command Lines Usage
Usage: NJCONV /i=xx /o=xx [options] InputFile [OutputFile] Where: InputFile - Input file name (can use wild card *? ) OutputFile - Output file name (default: CONV_xxx\Inputfile) /i=xx - input code /o=xx - output code where: xx is the Input/Output Codes listed above. General Options /h - Help (show this help message) /d - Disable summary dialogbox (Registered ver. Only) /addsp - Add a Space between CJK chars /delsp - Delete Spaces between CJK chars /fix - Fix corrupted Text (for GB/EUC/KSC/NewJIS) /nohtml - Strip out HTML tages/codes /wrap=nn - Wrap Text at colum nn (10) Chinese Options (outcode=GBK/GB2/Any Unicode) /sc - Convert to Simplified Chinese /tc - Convert to Traditional Chinese Japanese Options (outcode=SJIS) /hkana - Output Half Size Katakana GIF Options (outcode=GIF) /gifnf - No footer for GIF Picture /gifln=nn - nn = Number of Lines per GIF Picture /giftc=#rrggbb - GIF text color in RGB Hex /gifbc=#rrggbb - GIF Background color in RGB Hex Unicode Hex Options (outcode=Unicode Hex) /hex=n - n: 1 \ua1b2 2 \uA1B2 3 \xa1b2 4 \xA1B2 5 0xa1b2 6 0xA1B2 7 U+a1b2 8 U+A1B2 HKSCS PUA Options (incode=HKCSC or any Unicode, outcode=any Unicode) /pua=n - n: 1 PUA to Unicode, 2 Unicode to PUA, 3 ExtA+ExtB to PUA, 4 ExtB to PUA.
Examples
- Convert a Simplified Chinese web page into a traditional Chinese web page, and vice versa
- select and copy the original GB Chinese web page;
- select "Chinese GB" as Input Code, "Chinese Big5" as Output Code;
- click "Convert Clipboard" button; then paste into a new document and save as web page.
- Convert Simplified Microsoft Word document to Traditional Chinese, and vice versa
- select and copy the original Word document;
- select "Unicode RTF" as Input Code and Output Code;
- check "Traditional Chinese" option in the middle;
- click "Convert Clipboard" button; then paste into a new Word document.
- Copying Chinese text from IE web page to Windows Notepad (Windows 98/ME)
- copy selected Chinese text from Internet Explorer;
- select "Unicode UCS2" as Input Code, "Chinese GB" (or Big5) as Output Code;
- click "Convert Clipboard" button; then paste into NotePad.
(copying from Microsft Word to Notepad follows the same procedure)
- Copying Chinese text from NotePad to form fields on web page (Windows 98/ME)
- copy selected Chinese text from NotePad;
- select "Chinese GB" (or Big5) as Input Code, "Unicode UCS2" as Output Code;
- click "Convert Clipboard" button; then paste into web page.
(copying from Notepad to Microsft Word follows the same procedure)
- Unique "CJK => GIF" conversion can convert a whole Chinese/Japanese/Korean book into picture format!
- For more advanced users, "Command Line Usage" is available for batch file conversion.
Download Demo
Free 30 day trial version of NJStar Communicator (including Universal Code Converter) is available for pre-purchase evaluation.