OS/2 tricks: How to set up DBCS environment on SBCS OS/2 #1 Configuration

The first step to enable DBCS environment is to configure your system.

1. CODEPAGE statement

OS/2 is a system based on a code page. You can specify two code pages.  For example, you can see the line like following in config.sys

CODEPAGE=850,437

First is a primary code page, which is used by processes by default. Second is a secondary code page, which is an auxiliary code page used by some processes on demand.

To enable DBCS environment, you should add a DBCS code page which you want to use to CODEPAGE as a primary or a secondary. For example,

CODEPAGE=850,949

949 is a Korean code page. Like this, adding a DBCS code page as a secondary code page is most safe. Because if a DBCS code page is used as a primary code page,

1. You will see an error like this on every boot.
SYS1729: The code page 949 is not acceptable for the display.
Press Enter to continue...
2. Some programs may conflict with DBCS code pages. For example, some resources of eWP is corrupted like this.



However, using a DBCS code page as a secondary code page also has some problems.

1. You cannot see DBCS characters on WPS.

2. You should execute a program in DBCS code page manually to enable DBCS features in that program. For example, [CHCP] on command window(CHCP of 4OS2 shipped with eComStation does not work correctly. Upgrade it to the latest version or use CMD.EXE) or [Language] tab of [Properties] of icons on WPS.


Out of the above problems, some problems can be fixed. They are that error message is displayed on every boot and that DBCS characters are not displayed on WPS. That is because DBCS code page is a primary code page. This is because a code page of WPS(PMSHELL.EXE) is not a DBCS code page. Idea to fix them is simple. All you have to do is to execute WPS on a DBCS code page with adding a DBCS code page as a secondary code page.

Here is the small utility to execute PMSHELL.EXE in a secondary code page.


Copy cp2_pmshell.exe into [X:\OS2] directory, and replace [PMSHELL.EXE] with [cp2_pmshell.exe] of [PROTSHELL=] line and [SET RUNWORKPLACE=] line in CONFIG.SYS. For example,

PROTSHELL=X:\OS2\CP2_PMSHELL.EXE
SET RUNWORKPLACE=X:\OS2\CP2_PMSHELL.EXE

Where X is a boot drive of OS/2.

Nevertheless, resource corruption which should be fixed by OS/2 provider and manual change of a code page to a DBCS code page still remain.

The following is a list of code pages for DBCS.

  • 932 : Japan
  • 942 : Japan JIS-78
  • 943 : Japan JIS-90
  • 949 : Korea
  • 950 : Taiwan Big5
  • 1381 : China(PRC) GB
  • 1386 : China(PRC) GBK

See <Command Reference> for details like this,

view cmdref codepage

2. COUNTRY statement

If you set CODEPAGE correctly, then now is the turn to modify COUNTRY statement. Just replace the country code to DBCS one which you want.

Here is a list of COUNTRY code for DBCS countries

  • 081 : Japan
  • 082 : Korea
  • 086 : China(PRC)
  • 088 : Taiwan

For example, in case of Korea

COUNTRY=082,X:\OS2\SYSTEM\COUNTRY.SYS

See <Command Reference> for details like this,

view cmdref country

3.  FAT32

FAT32 supports to specify a code page to which an unicode file name should be converted. You can do this by passing [/CP] option to CACHEF32.EXE like this.

CALL=X:\ECS\BIN\CACHEF32.EXE /CP:xxx [options...]

Where xxx is a code page number listed above. If you don't want to use LAZY WRITE, then add [/L:OFF].


4. Environmental variables

Some environmental varaibles should set to the proper locale. They are

  • LANG
  • TCPLANG

Possible locales are

  • ja_JP : Japan
  • ko_KR : Korea
  • zh_CN : China
  • zh_TW : Taiwan

For details, see [Setting the System Locale Name] of <Command Reference> like this.

view cmdref set

5. Locales on WPS

You can specify a locale for WPS. [Locale(Country Palette)] do it. It is in [Local System] - [System Setup].

Opening it, you'll see various locales according to [LANG] environmental variable. Then do like this.

  1. Out of them, select the icon whose name is same as [LANG]
  2. Click Right-Mouse-Button
  3. Click [Mark as default...] in a popup window.

Now, it's ready to use minimum DBCS environments on SBCS.

Next, let's find the way to display DBCS characters.


댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷