JP2629040B2 - Japanese processing system - Google Patents

Japanese processing system

Info

Publication number
JP2629040B2
JP2629040B2 JP1032449A JP3244989A JP2629040B2 JP 2629040 B2 JP2629040 B2 JP 2629040B2 JP 1032449 A JP1032449 A JP 1032449A JP 3244989 A JP3244989 A JP 3244989A JP 2629040 B2 JP2629040 B2 JP 2629040B2
Authority
JP
Japan
Prior art keywords
code
byte
character
width
full
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1032449A
Other languages
Japanese (ja)
Other versions
JPH02257276A (en
Inventor
清 渡辺
陽子 白石
Original Assignee
株式会社 ピーエフユー
ピーエフユー関西ソフトウェア 株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社 ピーエフユー, ピーエフユー関西ソフトウェア 株式会社 filed Critical 株式会社 ピーエフユー
Priority to JP1032449A priority Critical patent/JP2629040B2/en
Publication of JPH02257276A publication Critical patent/JPH02257276A/en
Application granted granted Critical
Publication of JP2629040B2 publication Critical patent/JP2629040B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Description

【発明の詳細な説明】 [概要] 半角文字と全角文字が混在する日本語処理システムに
関し, 半角文字と全角文字を制御コードを用いることなく容
易に識別することができる日本語処理システムを提供す
ることを目的とし、 変換処理部を有する日本語処理システムであって,変
換処理部はコード発生部と文字処理部を有し,コード発
生部は,入力装置から1バイトで表すJISの半角文字コ
ードと,2バイトコードで表すJISの全角文字コードが混
在する信号を入力し,1バイトの半角文字のコードから,
そのコードの8ビットで表す数値が予め設定された所定
数値以下となるビット構成となるコードを発生し,2バイ
トの全角文字のコードから,その上位バイトの8ビット
で表す数値がその所定数値より大きい値をとるビット構
成となる全角文字コードを発生し,文字処理部は,コー
ド発生部の出力信号を入力し,文字コードの1バイトで
表す数値を判別し,所定数値以下の場合は当該バイトを
半角文字と識別し,所定数値より大きい時は当該バイト
と後続する1バイトとを組み合わせた2バイトを全角文
字として識別するように構成する。
DETAILED DESCRIPTION OF THE INVENTION [Overview] Regarding a Japanese processing system in which half-width characters and full-width characters are mixed, a Japanese-language processing system that can easily identify half-width characters and full-width characters without using a control code is provided. A Japanese processing system having a conversion processing unit, wherein the conversion processing unit has a code generation unit and a character processing unit, and the code generation unit is a JIS half-width character code represented by 1 byte from the input device. And a signal containing both JIS full-width character codes represented by 2-byte codes are input.
Generates a code with a bit structure in which the numerical value represented by the 8 bits of the code is equal to or less than a predetermined value, and the numerical value represented by the 8 bits of the high-order byte from the 2-byte double-byte character code A full-width character code with a bit configuration that takes a large value is generated. The character processing unit inputs the output signal of the code generation unit, determines the numerical value represented by one byte of the character code, and if the value is less than a predetermined numerical value, the byte Is identified as a half-width character, and when it is larger than a predetermined numerical value, two bytes obtained by combining the byte and the following one byte are identified as a full-width character.

[産業上の利用分野] 本発明は半角文字と全角文字が混在する日本語処理シ
ステムに関する。
[Industrial Application Field] The present invention relates to a Japanese processing system in which half-width characters and full-width characters are mixed.

近年、情報処理システム例えば、給与管理,在庫管理
などを行う事務処理システムや、日本語文書作成システ
ムにおいて、アルファベット・数字・カナ文字を表す半
角文字と漢字や図形・記号などを表す全角文字を混在し
て表現することが普通に行われており、全・半角混在文
字の半角文字と全角文字をいかに容易に識別するかが日
本語処理全体の構成、処理性能,内部データ量を決める
上で重大な要素となっている。
In recent years, in information processing systems such as office management systems that perform salary management and inventory management, and Japanese document creation systems, half-width characters that represent alphabets, numbers, and kana characters and full-width characters that represent kanji, figures, and symbols are mixed. Normally, it is important to determine how easily half-width and full-width characters of mixed-width and full-width characters can be identified in determining the overall configuration, processing performance, and internal data volume of Japanese language processing. Elements.

[従来の技術] 従来技術を第6図乃至第9図を用いて説明する。第6
図は従来のJIS(日本工業規格)により定められた、コ
ード体系を示し、第7図はその中の半角文字コード体系
図、第8図は従来の別のコード体系を示す図、第9図は
制御コードを使用した文字及び文字列を示す図である。
[Prior Art] A conventional technique will be described with reference to FIGS. 6 to 9. Sixth
FIG. 7 shows a conventional code system defined by JIS (Japanese Industrial Standards), FIG. 7 shows a half-width character code system diagram, FIG. 8 shows another conventional code system, and FIG. FIG. 4 is a diagram showing characters and character strings using control codes.

従来、文字の中で、アルファベット,数字,カナ文字
等の半角文字を表すためにJIS8単位コード系を用い、漢
字,記号,図形などの全角文字を表すために1文字が2
バイト(1バイト=8ビット)のJIS6226コード系が使
用されている。
Conventionally, JIS8 unit code system is used to represent half-width characters such as alphabets, numbers, and kana characters, and two characters represent two-byte characters such as kanji, symbols, and figures.
The JIS6226 code system of bytes (1 byte = 8 bits) is used.

第6図には、上位バイト(8ビット)を16進数(4ビ
ット)2桁の数字で表した目盛りにより縦軸方向に表示
し、下位バイト(8ビット)を同様に16進数2桁の数字
で表した目盛により横軸方向に表示しており、前記のJI
S6226コード系により使用される2バイトの文字は上位
バイト(第1バイト)と下位バイト(第2バイト)が共
に、16進数の21〜7Eの領域のコードを使用し、第6図に
斜線が施された領域であり、これを(2121〜7E7E)16
表示する。
In Fig. 6, the upper byte (8 bits) is displayed in the vertical axis direction with a scale expressed by a hexadecimal (4 bits) 2-digit number, and the lower byte (8 bits) is also a 2-digit hexadecimal number It is displayed in the horizontal axis direction by the scale expressed by
For the two-byte character used by the S6226 code system, both the upper byte (first byte) and the lower byte (second byte) use the codes of the hexadecimal 21 to 7E area. This area is indicated as (2121 to 7E7E) 16 .

一方、JIS8単位の半角文字(アルファベット,数字,
カナ文字)のコードは、8ビット構成であるため、JIS6
226コード系のように平面として表示できないので、そ
の上位バイト(8ビット)の縦軸に並行する直線上に表
現すると、第6図の右端に示すように表示される。すな
わち、8ビットを16進数2桁で表すと、00〜7Fで半角,
英数字を表し、A0〜DFで半角カナ文字を表す。00〜7Fの
うち事務処理で通常使用されるアルファベット記号の範
囲は(20)16〜(7F)16である。
On the other hand, half-width characters (alphabet, numbers,
Kana characters have an 8-bit code, so JIS6
Since it cannot be displayed as a plane like the 226 code system, if it is expressed on a straight line parallel to the vertical axis of the upper byte (8 bits), it is displayed as shown on the right end of FIG. In other words, if 8 bits are represented by two hexadecimal digits, 00 to 7F is half-width,
Represents alphanumeric characters, A0 to DF represent half-width kana characters. Of the 00 to 7F, the range of alphabetic symbols usually used in paperwork is (20) 16 to (7F) 16 .

第7図はこのJIS8単位コードを、上位4ビットを表す
縦軸の16進数の目盛と、下位4ビットを表す横軸の16進
数の目盛上で表現したもので、(20)16〜(7F)16
(A0)16〜(DF)16の各使用領域を表わす。
FIG. 7 shows this JIS8 unit code on a hexadecimal scale on the vertical axis representing the upper 4 bits and a hexadecimal scale on the horizontal axis representing the lower 4 bits, from (20) 16 to (7F ) 16 and (A0) 16 to (DF) 16 are used.

この内容によれば、全角文字の上位バイトと半角文字
は明らかに同じコードを使用して、重複するため、この
コード体系によっては半角文字と全角文字を区別するこ
とができない。
According to the contents, since the upper byte and the half-width character of the full-width character clearly use the same code and overlap, the half-width character and the full-width character cannot be distinguished depending on this code system.

そこで、全角文字コードにある定数を加えることによ
り半角文字コードとの重複を回避するコード系(シフト
JIS)が考えられている。このコードは、第6図に示す
ように上位バイトのコードとして8単位コード系で使用
しない領域(81〜9FおよびE0〜FC)のコードを割り当て
る。
Therefore, a code system that avoids duplication with half-width character codes by adding a constant to full-width character codes (shift
JIS) is considered. As shown in FIG. 6, the codes of the areas (81 to 9F and E0 to FC) not used in the 8-unit code system are assigned to the codes as the upper byte code.

ところが、この方式ではJISの第1水準,第2水準漢
字及びJIS非漢字(全6802文字)の表現は可能となる
が、それ以上の文字種を表現することができない。
However, this method allows the representation of JIS first-level and second-level kanji and JIS non-kanji (total 6802 characters), but cannot express any more character types.

JIS6226コード系を変形した従来の別のコード体系を
第8図に示す。
FIG. 8 shows another conventional code system modified from the JIS6226 code system.

この体系では、JIS6226コードの上位バイトと下位バ
イトのそれぞれに一定数(16進数の80)を加算して、領
域(A1A1〜FEFE)16を使用するとともに、多数の漢字を
割当てるための拡張文字領域(ユーザが定義して使用す
る文字領域も含む)を設け、図に示すように、拡張領域
として(41A1〜A0FE)16を使用する。そして、半角文字
の領域としては、JIS8単位と同様に00〜7Fで半角,英数
字を表し、A0〜DFで半角カナ文字を表す。
In this system, a fixed number (80 in hexadecimal) is added to each of the upper byte and the lower byte of the JIS6226 code to use an area (A1A1 to FEFE) 16 and an extended character area for allocating a large number of kanji (Including a character area defined and used by the user), and (41A1 to A0FE) 16 is used as an extended area as shown in the figure. As for the half-width character area, half-width characters and alphanumeric characters are represented by 00 to 7F and half-width kana characters are represented by A0 to DF as in the JIS8 unit.

しかし、この従来の別の方式によっても、JIS8単位の
半角文字のコードと全角文字の第1バイトのコードが重
複する点に変わりがない。
However, even with this other conventional method, the code of the half-byte character in JIS8 unit and the code of the first byte of the full-width character remain the same.

このため、JIS6226コード系の場合や、シフトJISにお
いて規定された文字種以上の文字を使用する場合は、全
角文字列の開始と終了時に、半角文字コードと重複しな
い制御コードを付加し、半角文字と全角文字を区別する
方式が従来とられている。
For this reason, in the case of the JIS6226 code system or when using characters of character types specified in Shift JIS, at the start and end of the full-width character string, add a control code that does not overlap with the half-width character code, and Conventionally, a method for distinguishing full-width characters has been adopted.

制御コードを使用した時の、文字と文字列のコード長
の説明図を第9図に示す。図において、半角文字“A"は
1バイトで表し、全角文字“花子”はそれぞれ2バイト
で表されるが、前後に1バイトの全角開始制御コード
(CS)と全角終了制御コード(CE)が付加され、合計6
バイトとなる。そして、文例として「ABあい12ァ」と
いう半角文字(5文字)と全角文字(3文字)が混在し
た文字列を表現すると、制御コードCS,CEが何個も使用
されるので、合計15バイトになってしまう。
FIG. 9 is an explanatory diagram of the code lengths of characters and character strings when the control codes are used. In the figure, a half-width character "A" is represented by 1 byte, and a full-width character "Hanako" is represented by 2 bytes. A full-width start control code (CS) and a full-width end control code (CE) of 1 byte are added before and after. Added, total 6
It becomes bytes. If a character string that is a mixture of half-width characters (5 characters) and full-width characters (3 characters) called "AB Ai 12a" is used as a sentence example, a number of control codes CS and CE are used, so a total of 15 bytes Become.

[発明が解決しようとする課題] 上記したように、半角文字と全角文字が混在した場
合、従来は余分に制御コードを付加して半角・全角の識
別を行うため、全角/半角の切替えが頻繁に発生するの
で処理時間が余分にかかるだけでなく、制御コードが増
えるためにデータ量の増大を招いてシステム性能を悪化
させるという問題があった。
[Problems to be Solved by the Invention] As described above, when half-width characters and full-width characters coexist, conventionally, an extra control code is added to distinguish between half-width and full-width characters. In addition to this, there is a problem that not only an extra processing time is required but also an increase in the number of control codes leads to an increase in the amount of data, thereby deteriorating the system performance.

本発明は、半角文字と全角文字を制御コードを用いる
ことなく容易に識別することができる日本語処理システ
ムを提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a Japanese processing system that can easily identify half-width characters and full-width characters without using a control code.

[課題を解決するための手段] 本発明による基本構成図を第1図に示し、本発明の原
理説明図を第2図に示す。
[Means for Solving the Problems] FIG. 1 shows a basic configuration diagram according to the present invention, and FIG. 2 shows a principle explanatory diagram of the present invention.

第1図において,31は入力したJISコードを本発明によ
るコードに変換する変換処理部,10はコード発生部,11
は,文字処理部、12は文字識別手段である。
In FIG. 1, reference numeral 31 denotes a conversion processing unit for converting an input JIS code into a code according to the present invention; 10, a code generation unit;
Denotes a character processing unit, and 12 denotes a character identification unit.

第2図の原理説明図には、本発明の半角・全角文字識
別方式において使用する文字コードの領域とコード表現
を示し、以下にこの第2図について説明する。
The principle explanatory diagram of FIG. 2 shows a character code area and a code expression used in the half-width / full-width character identification system of the present invention, and FIG. 2 will be described below.

第2図A.に示すように、JIS6226コード系で使用する
文字コードに対して一定の数値を加算して、縦軸(第1
バイト),横軸(第2バイト)ともに16進数A0〜FEで囲
む領域(AOAO〜FEFE)16のコードを使用すると共に、そ
れ以外の多数の漢字や、ユーザが定義する文字領域のた
めに縦軸の16進数A0〜FE,横軸の16進数41〜9Fで囲まれ
る領域(A041〜FE9F)16を使用する。このように、全角
文字については、第8図に示す従来の別の方式のコード
体系を変更したものである。
As shown in Fig. 2A, a fixed numerical value is added to the character code used in the JIS6226 code system,
Bytes) and the horizontal axis (second byte) use hexadecimal numbers A0 to FE (AOAO to FEFE). A 16-character code is used, and a number of other kanji characters and user-defined character areas are used vertically. An area (A041 to FE9F) 16 enclosed by hexadecimal numbers A0 to FE on the axis and hexadecimal numbers 41 to 9F on the horizontal axis is used. As described above, the full-width characters are obtained by changing the code system of another conventional system shown in FIG.

一方、JIS8単位符号で割り当てられている半角文字の
英数字,カナ文字については、8ビットコードを16進数
2桁の数字で表すと、00〜9Fの範囲のコードを使用し、
第2図A.の右端に示す直線に矢印を付して示す範囲であ
る。この半角文字のコードは、従来の第8図に示す英数
字記号の範囲の文字コードから(20)16を引いたもの
と、カナ文字のコードから(40)16を引いたものを組み
合わせて構成され、第2図のB.にその8ビットコードを
上位デジット(4ビット)と下位デジット(4ビット)
による座標により表される。
On the other hand, for half-width alphanumeric characters and kana characters assigned by JIS8 unit code, if the 8-bit code is represented by a 2-digit hexadecimal number, a code in the range of 00 to 9F is used.
This is the range shown by adding an arrow to the straight line shown at the right end of FIG. 2A. This half-width character code consists of a combination of the conventional character code in the range of alphanumeric symbols shown in Fig. 8 minus (20) 16 , and the kana character code minus (40) 16. The 8-bit code is stored in the upper digit (4 bits) and the lower digit (4 bits) in B of FIG.
Is represented by the following coordinates.

第2図から分かるように、本発明で使用するコード体
系の場合、半角文字は、1バイト(8ビット)である文
字コードの値が00〜9F(16進数)の範囲であり、全角文
字は2バイトの文字コードの内の上位バイトのコードの
値がA0〜FEの範囲である。
As can be seen from FIG. 2, in the coding system used in the present invention, the half-width character has a character code value of 1 byte (8 bits) in the range of 00 to 9F (hexadecimal), and the full-width character is The value of the code of the upper byte of the 2-byte character code is in the range of A0 to FE.

第2図A.に示す、JIS6226コード系の全角文字の領域
は、第8図として示す従来の別の方式のコード系の場合
と同じ領域であり、第8図に示す領域(A041〜FE9F)16
である点で異なるが、領域内に収容される文字種の数は
同一である。従って、第8図の方式により拡張領域(41
A0〜9FFE)16に割当てられた文字コードの2バイトの上
位バイト,下位バイトの順番を反転することにより、第
2図A.に示す領域(A041〜FE9F)16のコードに変換され
る。
The full-width character area of the JIS6226 code system shown in FIG. 2A is the same as the area of the conventional code system of another system shown in FIG. 8, and the area shown in FIG. 8 (A041 to FE9F) 16
However, the number of character types accommodated in the area is the same. Therefore, the extended area (41
A0~9FFE) 2 bytes of the high byte of the character code assigned to 16, by reversing the order of the lower byte is converted region shown in FIG. 2 A. (A041~FE9F) into 16 code.

本発明は、半角文字か全角文字かを先頭の1バイトの
コードにより識別して、識別結果に応じて半角文字また
は全角文字の処理を行うものである。
According to the present invention, a half-width character or a full-width character is identified by a leading one-byte code, and the half-width character or the full-width character is processed according to the identification result.

[作用] 第1図において、入力装置から入力されたコードまた
は、JIS規格によるコードはコード発生部10において、
第2図A.に示す本発明のコードを発生する。この場合、
JIS規格による入力装置から入力されたコードは所定の
数値を加算してシフトし、8単位符号に対しても同様の
加算または減算を施す。コード発生部10から発生した文
字は第1図の上部にA,Bとして示すもうなコード形式で
あり、その先頭バイト(半角文字は1バイトだけ)のコ
ードは第2図A.に示す数値の範囲に割当てられている。
[Operation] In FIG. 1, a code input from an input device or a code according to the JIS standard is output by a code generator 10.
The code of the present invention shown in FIG. 2A is generated. in this case,
A code input from an input device conforming to the JIS standard is shifted by adding a predetermined numerical value, and the same addition or subtraction is performed on an 8-unit code. The characters generated from the code generator 10 are in the other code format shown as A and B at the top of FIG. 1, and the code of the first byte (the single-byte character is only 1 byte) is the numerical value shown in FIG. Assigned to a range.

このようにして、第2図A.に示すコード体系に従った
コードは文字処理部11に入力し、指定された各種の処
理、削除、挿入等が行われる。
In this way, a code according to the code system shown in FIG. 2A is input to the character processing unit 11, and various kinds of specified processing, deletion, insertion, and the like are performed.

文字処理部11内には文字識別手段12が備えられ、コー
ド発生部から入力されたコードは2バイトのコード保持
手段121に格納され、先頭の1バイトについて判別手段1
22により判別する。判別は1バイトのコードを8ビット
の数値として扱い、所定の値(第2図Aの16進数“A
0")と比較して、A0未満の場合は半角文字コードと識別
し、その1バイトを取り出して文字処理を行い、それ以
外(A0以上)の場合は全角文字と識別してコード保持手
段121の2バイト(識別したバイトが上位のバイト後続
の1バイトを下位バイトとして)を取り出して文字処理
を行う。
The character processing unit 11 includes a character identification unit 12. The code input from the code generation unit is stored in a 2-byte code holding unit 121.
Determined by 22. For the discrimination, a one-byte code is treated as an 8-bit numerical value, and a predetermined value (hexadecimal “A” in FIG. 2A)
0 "), if it is less than A0, it is identified as a half-width character code, one byte is taken out, and character processing is performed. Otherwise (A0 or more), it is identified as a full-width character, and it is identified as a full-width character. (The one byte following the upper byte of the identified byte is taken as the lower byte) and character processing is performed.

この本発明によるコードにより処理した結果は、その
コードのまま記憶装置(図示しない)に格納され、JIS
規格の出力装置に出力する場合は、元のコードに変換す
ることにより従来の入・出力装置を使用することができ
る。
The result processed by the code according to the present invention is stored in a storage device (not shown) as it is,
When outputting to a standard output device, a conventional input / output device can be used by converting it to the original code.

このように、本発明は常に半角文字を1バイト、全角
文字を2バイトで表すため、表示や印刷時の文字長と実
際のデータ長が一致してずれることがないので処理が簡
便になり、制御コードを用いないのでデータの記憶・処
理するための資源を節約することができる。
As described above, since the present invention always represents half-width characters by 1 byte and full-width characters by 2 bytes, the character length at the time of display or printing does not coincide with the actual data length, so that processing is simplified, Since no control code is used, resources for storing and processing data can be saved.

なお、第8図に示す従来の別の方式のコードが入力さ
れることが分かっている場合、そのコードが拡張領域の
全角文字のコードであることが識別された場合、その2
バイトのコードの上位と下位を置き換えることにより本
発明のコードに変換することができ、拡張領域でないJI
S規格の領域(A1A1〜FEFE)16の全角文字の場合はその
コードがそのまま本発明のコードとなる。
When it is known that a code of another conventional method shown in FIG. 8 is input, and when it is determined that the code is a code of a full-width character in the extended area, the second part is used.
By replacing the upper and lower bytes of the byte code, it can be converted to the code of the present invention.
S standard area (A1A1 to FEFE) In the case of 16 double-byte characters, the code is directly used as the code of the present invention.

[実施例] 第3図は本発明の実施例構成図、第4図は文字処理の
フロー図、第5図は本発明と従来例の処理の差異を示す
図である。
Embodiment FIG. 3 is a block diagram of an embodiment of the present invention, FIG. 4 is a flowchart of character processing, and FIG. 5 is a diagram showing a difference between the present invention and a conventional example.

第3図には本発明によるコード系を用いた日本語処理
システムの実施例構成が示されている。
FIG. 3 shows an embodiment of a Japanese language processing system using a code system according to the present invention.

図の30はJIS規格の文字列を入力するキーボート等の
入力装置、31は入力したJIS規格コードを本発明による
コード(以下,本方式コードという)に変換する変換処
理部,32は本方式のコードに変換されたコードテーダを
保存する記憶装置、33は本方式のコードの文字列に挿
入,削除等の編集を行うデータ編集部(第1図の文字処
理部に対応)、34は本方式コードからJIS規格コードに
復元する復元処理部、35はJIS規格の文字例を表示する
表示装置、36はJIS規格文字列を印字する印刷装置を表
す。
In the figure, 30 is an input device such as a keyboard for inputting a JIS standard character string, 31 is a conversion processing unit for converting the input JIS standard code into a code according to the present invention (hereinafter referred to as the present system code), 32 is A storage device for storing a codeta converted into a code, 33 is a data editing unit (corresponding to the character processing unit in FIG. 1) for editing such as insertion and deletion into a character string of the code of the system, and 34 is a code for the system. A restoration processing unit for restoring the JIS standard code from the JIS standard code, a display device 35 for displaying a JIS standard character example, and a printing device 36 for printing a JIS standard character string.

入力装置30によって入力されたJIS規格文字列は、変
換処理部31によって本方式コードに変換される。データ
編集部33は、文字列の挿入・削除等の編集を行うが、そ
の際に半角文字と全角文字の識別を行う。
The JIS standard character string input by the input device 30 is converted by the conversion processing unit 31 into the present system code. The data editing unit 33 performs editing such as insertion / deletion of a character string, and at that time, identifies half-width characters and full-width characters.

文字処理のフローを第4図により説明すると、識別動
作が開始すると、文字列から1バイトを取り出し(ステ
ップ40)、その1バイトの値が(AO)16より小さいか判
別される(ステップ41)。この判別の結果YESである場
合は、当該1バイトを半角文字と識別し(ステップ4
2)、NOと判別された場合は当該判別した1バイトと文
字列の次の1バイトを含めて全角文字と識別する(ステ
ップ43)。識別結果は編集処理において利用される。こ
のように1バイトを判別するだけなので高速に実行され
る。
The character processing flow will be described with reference to FIG. 4. When the identification operation starts, one byte is extracted from the character string (step 40), and it is determined whether the value of the one byte is smaller than (AO) 16 (step 41). . If the result of this determination is YES, the one byte is identified as a half-width character (step 4).
2) If it is determined as NO, it is identified as a full-width character including the one byte determined and the next byte of the character string (step 43). The identification result is used in the editing process. As described above, since only one byte is determined, high-speed execution is performed.

編集が終了した時に、記憶装置32に格納する場合は本
方式コードで保存することにより制御コードを用いた場
合に比べて少ないデータ量となる。またJIS規格コード
を用いる表示装置35や、印刷装置36に日本語文字を表示
したり、印字により出力する場合は、復元処理部34にお
いてデータ編集部33や、記憶装置32から取り出した本方
式コードによる文字コードをJIS規格コードに復元(変
換)して、表示装置35または印刷装置36に出力する。
When the data is stored in the storage device 32 when the editing is completed, the data amount is reduced by storing the data using the system code, compared with the case where the control code is used. When displaying Japanese characters on the display device 35 using the JIS standard code or on the printing device 36 or outputting the characters by printing, the data processing unit 33 in the restoration processing unit 34 and the system code extracted from the storage device 32 Is restored (converted) into a JIS standard code and output to the display device 35 or the printing device 36.

第5図は、本発明と従来例の処理の違いを示す図であ
る。
FIG. 5 is a diagram showing the difference between the processing of the present invention and that of the conventional example.

第5図のa.は本発明による処理を示し、半角文字と全
角文字が混在している文字列「A全1角文ア字」に対し
て、4桁目(4バイト目)から2桁分を削除する場合
(半角文字1文字が1桁、全角文字1文字で2桁分数え
る)、削除桁および終了桁が、それぞれ全角文字の下位
バイト及び上位バイトの時は、その前の桁及び次の桁を
含めて削除する必要がある。従って、常に半角文字か全
角文字かの識別を行うが、本発明の識別方式により識別
処理を高速に行うことができる。
FIG. 5a shows the processing according to the present invention, and is performed from the fourth digit (the fourth byte) to the second digit for the character string "A full-width one-byte sentence A" in which half-width characters and full-width characters are mixed. When deleting a minute (one half-width character counts for one digit and one full-width character counts for two digits), when the deletion digit and end digit are the lower byte and upper byte of the full-width character, respectively, It must be deleted including the next digit. Therefore, although a half-width character or a full-width character is always identified, the identification method of the present invention enables high-speed identification processing.

また、削除した後、削除文字の前に位置する文字列
(図の場合“A全”)と後に位置する文字列(図の場合
“文ア字”)を結合しなければならないが、本発明のコ
ード系では単に削除した桁数分(図の場合は3桁)だけ
後ろの文字列を前に移動するだけでよく、結合処理が容
易である。
Further, after deletion, the character string located before the deleted character ("all A" in the figure) must be combined with the character string located after ("a" in the figure). In the code system described above, it is only necessary to move the character string behind by the number of deleted digits (three digits in the figure) to the front, and the combining process is easy.

第5図のb.は、同様の削除処理を制御コードを使用す
る従来方式で実行した場合の例である。
FIG. 5B shows an example in which the same deletion processing is executed by a conventional method using a control code.

従来は、制御コードを用いた場合、現在の文字が半角
であるか全角文字であるかを別に設けた全角文字モード
フラグ(フリップフロップにより構成を参照して判断し
なければならない。但し、全角文字モードフラグは全角
開始制御コードが現れた時にオン、全角終了制御コード
が現れた時にオフにされる。また、削除後の文字列の結
合処理においても、削除文字の直前の文字と直後の文字
(図の例では“全”と“文”)を比較して共に全角文字
ならば両者の間に存在する不要な制御コード(図の例で
は“全”の後の全角終了制御コード)を削除する等の複
雑な処理が必要となる。
Conventionally, when a control code is used, it is necessary to determine whether the current character is a half-width character or a full-width character by referring to the configuration of a separately provided full-width character mode flag (a flip-flop. The mode flag is turned on when the full-width start control code appears, and turned off when the full-width end control code appears.Also, in the process of combining the character strings after deletion, the character immediately before and after the character to be deleted (the character ( In the example of the figure, “full” and “sentence” are compared, and if both are full-width characters, unnecessary control codes existing between them (the full-width end control code after “all” in the example of the figure) are deleted. And other complicated processes are required.

このように、本発明では従来例で必要とされた複雑な
処理を不要にし、高速処理を実現することができる。
As described above, according to the present invention, complicated processing required in the conventional example is unnecessary, and high-speed processing can be realized.

[発明の効果] 本発明によれば、JIS規格の全角文字に拡張文字を加
えた豊富な文字種を扱いながら、半角文字と全角文字の
識別を簡単に行うことができるばかりでなく、制御コー
ドを使用しないので、半角文字と全角文字の切替えが頻
繁に発生するような文字列を処理する場合でも、データ
量が増えることなく、常に表示・印刷字の文字長とデー
タ長が一致する。これにより、メモリ資源の節約と日本
語処理性能の向上を計ることができる。
[Effects of the Invention] According to the present invention, while handling a wide variety of character types in which extended characters are added to JIS standard full-width characters, not only can half-width characters and full-width characters be easily identified, but also control codes can be used. Since it is not used, even when processing a character string in which half-width characters and full-width characters are frequently switched, the character length of the displayed / printed characters always matches the data length without increasing the data amount. As a result, it is possible to save memory resources and improve the Japanese processing performance.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の基本構成図、第2図は本発明の原理説
明図、第3図は本発明の実施例構成図、第4図は文字処
理のフロー図、第5図は本発明と従来例の処理の違いを
示す図、第6図は従来のJISによるコード体系を示す
図、第7図は従来の半角文字コード体系図、第8図は従
来の別のコード体系を示す図、第9図は制御コードを使
用した文字及び文字列を示す図である。 第1図中、 10:コード発生部 11:文字処理部 12:文字識別手段 31:変換処理部
FIG. 1 is a basic configuration diagram of the present invention, FIG. 2 is a diagram illustrating the principle of the present invention, FIG. 3 is a configuration diagram of an embodiment of the present invention, FIG. 4 is a flowchart of character processing, and FIG. Fig. 6 shows the conventional JIS encoding system, Fig. 7 shows the conventional half-width character encoding system, and Fig. 8 shows another conventional encoding system. FIG. 9 is a diagram showing characters and character strings using control codes. In FIG. 1, 10: code generator 11: character processor 12: character identification means 31: conversion processor

フロントページの続き (72)発明者 白石 陽子 大阪府大阪市北区堂島1丁目5番17号 関西パナファコム株式会社内 (56)参考文献 特開 昭56−145425(JP,A) 特開 昭61−141072(JP,A)Continuation of front page (72) Inventor Yoko Shiraishi 1-5-17 Dojima, Kita-ku, Osaka-shi, Osaka Kansai Panafacom Co., Ltd. (56) References JP-A-56-145425 (JP, A) JP-A-61- 141072 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】変換処理部(31)を有する日本語処理シス
テムであって, 変換処理部(31)はコード発生部(10)と文字処理部
(11)を有し, コード発生部(10)は,入力装置から1バイトで表すJI
Sの半角文字コードと,2バイトコードで表すJISの全角文
字コードが混在する信号を入力し,1バイトの半角文字の
コードから,そのコードの8ビットで表す数値が予め設
定された所定数値以下となるビット構成となるコードを
発生し,2バイトの全角文字のコードから,その上位バイ
トの8ビットで表す数値がその所定数値より大きい値を
とるビット構成となる全角文字コードを発生し, 文字処理部(11)は,コード発生部(10)の出力信号を
入力し,文字コードの1バイトで表す数値を判別し,所
定数値以下の場合は当該1バイトを半角文字と識別し,
所定数値より大きい時は当該バイトと後続する1バイト
とを組み合わせた2バイトを全角文字として識別するこ
とを特徴とする日本語処理システム。
1. A Japanese processing system having a conversion processing unit (31), wherein the conversion processing unit (31) has a code generation unit (10) and a character processing unit (11). ) Is JI expressed in 1 byte from the input device
Input a signal in which the half-width character code of S and the full-width character code of JIS expressed by 2-byte code are mixed. From the code of 1-byte half-width character, the numerical value represented by 8 bits of the code is equal to or less than the preset numerical value. A two-byte full-width character code is generated, and a two-byte full-width character code is used to generate a two-byte character code having a bit configuration in which the numerical value represented by the 8 bits of the upper byte takes a value larger than the predetermined value. The processing unit (11) receives the output signal of the code generation unit (10), determines a numerical value represented by one byte of the character code, and if the numerical value is less than a predetermined numerical value, identifies the one byte as a half-width character.
When the value is larger than a predetermined value, a two-byte combination of the byte and the succeeding byte is identified as a double-byte character.
JP1032449A 1989-02-10 1989-02-10 Japanese processing system Expired - Lifetime JP2629040B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1032449A JP2629040B2 (en) 1989-02-10 1989-02-10 Japanese processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1032449A JP2629040B2 (en) 1989-02-10 1989-02-10 Japanese processing system

Publications (2)

Publication Number Publication Date
JPH02257276A JPH02257276A (en) 1990-10-18
JP2629040B2 true JP2629040B2 (en) 1997-07-09

Family

ID=12359275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1032449A Expired - Lifetime JP2629040B2 (en) 1989-02-10 1989-02-10 Japanese processing system

Country Status (1)

Country Link
JP (1) JP2629040B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07319855A (en) * 1994-05-25 1995-12-08 Nippon Denki Joho Service Kk Displaying method for character code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56145425A (en) * 1980-04-15 1981-11-12 Fujitsu Ltd Different-byte controlling system

Also Published As

Publication number Publication date
JPH02257276A (en) 1990-10-18

Similar Documents

Publication Publication Date Title
US5784069A (en) Bidirectional code converter
US4914704A (en) Text editor for speech input
US5784071A (en) Context-based code convertor
JP4017659B2 (en) Text input font system
JPH0351021B2 (en)
US6055365A (en) Code point translation for computer text, using state tables
US4727511A (en) Multitype characters processing method and terminal device
JP4451908B2 (en) Unicode converter
JP2629040B2 (en) Japanese processing system
WO1997010556A1 (en) Unicode converter
WO1997010556A9 (en) Unicode converter
EP0449322B1 (en) Text processing apparatus with formatting of text
JP2943791B2 (en) Language identification device, language identification method, and recording medium recording language identification program
JPH0365588B2 (en)
JP2634926B2 (en) Kana-Kanji conversion device
JPS5928190A (en) Character pattern generation system
JPS6371767A (en) Document producing device
KR860002030B1 (en) Hangul(korean character)combination device of line printer
JPH0352102B2 (en)
JPH06175893A (en) Character code converting device and document retrieving device using the same
JP2939063B2 (en) Document processing device
JPS59184941A (en) Kanji code converting method
JPH069043B2 (en) Character processing method
JPH03171252A (en) Character processor
JPS62125426A (en) Data input system