JP2011154495A - Character code conversion device, character code conversion method and character code conversion program - Google Patents

Character code conversion device, character code conversion method and character code conversion program Download PDF

Info

Publication number
JP2011154495A
JP2011154495A JP2010014909A JP2010014909A JP2011154495A JP 2011154495 A JP2011154495 A JP 2011154495A JP 2010014909 A JP2010014909 A JP 2010014909A JP 2010014909 A JP2010014909 A JP 2010014909A JP 2011154495 A JP2011154495 A JP 2011154495A
Authority
JP
Japan
Prior art keywords
code conversion
conversion
character
code
conversion table
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.)
Pending
Application number
JP2010014909A
Other languages
Japanese (ja)
Inventor
Hiroto Ejima
浩人 江島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Solution Innovators Ltd
Original Assignee
NEC System Technologies Ltd
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 NEC System Technologies Ltd filed Critical NEC System Technologies Ltd
Priority to JP2010014909A priority Critical patent/JP2011154495A/en
Publication of JP2011154495A publication Critical patent/JP2011154495A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a character code conversion device or the like rapidly and normally converting a character string including a special character or an external character. <P>SOLUTION: This character code conversion device 10 includes: an external storage means 14 storing a dictionary file 42 for defining a conversion rule wherein a first code conversion table group 41 including a plurality of code conversion tables and an optional character string between character codes before and after the conversion are associated; a code conversion processing part 51 storing one or more necessary code conversion tables from the first code conversion table group in a previously equipped main storage means 12 as a second code conversion table group 41B when started; and a dictionary conversion processing part 52 reading the dictionary file 42 when started, and updating a code conversion table corresponding to the conversion rule inside the second code conversion table group 41B based on the conversion rule defined inside the dictionary file. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は文字コード変換装置、文字コード変換方法、および文字コード変換プログラムに関し、特に特殊文字や外字を含む文字列を迅速に変換することを可能とする文字コード変換装置、文字コード変換方法、および文字コード変換プログラムに関する。   The present invention relates to a character code conversion device, a character code conversion method, and a character code conversion program, and in particular, a character code conversion device, a character code conversion method, and a character code conversion method that can quickly convert a character string including special characters and external characters. It relates to a character code conversion program.

コンピュータ上で文字を利用するための文字コードには数多くの体系がある。特に日本語ではEUC(EUC_JP)、JIS(7ビット)、シフトJIS(SHIFT_JIS)、ユニコード(UTF-8)などが多く使用されている。文字コードについては多くの規格が並立しているのに加えて、たとえば日本電気(株)のJIPS(JIPS(J)、JIPS(E))などのように、特定のベンダに固有の文字コードもある。   There are many systems for character codes for using characters on a computer. Particularly in Japanese, EUC (EUC_JP), JIS (7 bits), Shift JIS (SHIFT_JIS), Unicode (UTF-8), etc. are often used. In addition to many standards for character codes, there are also character codes specific to specific vendors, such as NEC Corporation's JIPS (JIPS (J), JIPS (E)). is there.

図9は、コンピュータネットワークで文字コードの変換が利用される場面の一例を示す説明図である。一般的なコンピュータネットワーク501は、端末装置であるクライアントコンピュータ510と、アプリケーションサーバ520とがインターネット530を介して接続され、アプリケーションサーバ520はさらにメインフレームによるホスト540と接続されている。アプリケーションサーバ520内部で、ウェブアプリケーション521、EJB(Enterprise JavaBeans)522、文字コード変換部523が動作している。   FIG. 9 is an explanatory diagram illustrating an example of a situation in which character code conversion is used in a computer network. In a general computer network 501, a client computer 510 as a terminal device and an application server 520 are connected via the Internet 530, and the application server 520 is further connected to a host 540 by a mainframe. Inside the application server 520, a web application 521, an EJB (Enterprise JavaBeans) 522, and a character code conversion unit 523 are operating.

クライアントコンピュータ510は、シフトJISやユニコードなどのような文字コードで記述された文字列を、ウェブアプリケーション521に送信する。文字コード変換部523は、ウェブアプリケーション521からEJB522を介して受けたこの文字列をJIPSに変換して、ホスト540で動作している既存のオンライン業務システムに送信して処理させる。ホスト540から返信されたJIPSで記述された処理結果は、文字コード変換部523でシフトJISやユニコードに変換されて、EJB522およびウェブアプリケーション521を通じてクライアントコンピュータ510に戻される。既存のオンライン業務システムを変更しなくてもよいように、このような文字コードの変換が必要となるのである。   The client computer 510 transmits a character string described in a character code such as Shift JIS or Unicode to the web application 521. The character code conversion unit 523 converts this character string received from the web application 521 via the EJB 522 to JIPS, and transmits the character string to an existing online business system operating on the host 540 for processing. The processing result described in JIPS returned from the host 540 is converted into shift JIS or Unicode by the character code conversion unit 523, and returned to the client computer 510 through the EJB 522 and the web application 521. This conversion of character codes is necessary so that existing online business systems need not be changed.

この例に限らず、コンピュータを利用する上で文字コードの変換が必要となる場面は多くある。たとえば、日本語の電子メールではJIS(7ビット)が事実上の標準の文字コードとされており、多くのコンピュータではシフトJISやユニコードなどの文字コードで作成された電子メールをJIS(7ビット)に変換してから送信している。   In addition to this example, there are many scenes in which character code conversion is required when using a computer. For example, JIS (7-bit) is the de facto standard character code for Japanese e-mail, and many computers use JIS (7-bit) for e-mail created with character codes such as Shift JIS and Unicode. It is sent after being converted to.

ある文字コードで定義されている文字が、別の文字コードでは定義されていない(または複数種類の文字に分けられている)などのような場合もある。たとえば特殊文字(ベンダー定義文字)や外字(ユーザ定義文字)などがこれに該当する。人名や地名などにそれらの特殊文字や外字などが含まれていることも多い。ある文字コードで記述された文字列を別の文字コードに変換する際、その文字列にそれらの特殊文字や外字などが含まれていると、正常な文字列に変換されないという問題が生じる。   In some cases, a character defined in one character code is not defined in another character code (or divided into a plurality of types of characters). For example, special characters (vendor-defined characters) and external characters (user-defined characters) correspond to this. Such special characters and external characters are often included in names of people and places. When a character string described in a certain character code is converted into another character code, if the character string includes those special characters or external characters, there is a problem that the character string is not converted into a normal character string.

特殊文字や外字を含む文字列の文字コード変換に関連する技術文献として、たとえば次に示す各特許文献がある。その中でも特許文献1には、特殊文字や外字のコード変換を、通常の文字コードに対するコード変換装置とは別装置で行ない、その後、通常の文字コードに対するコード変換装置に渡すという文字コードの変換手法が記載されている。   As technical documents related to character code conversion of character strings including special characters and external characters, for example, there are the following patent documents. Among them, Patent Document 1 discloses a character code conversion method in which code conversion of special characters and external characters is performed by a device different from a code conversion device for normal character codes, and then passed to a code conversion device for normal character codes. Is described.

また特許文献2には、片方向のみの変換テーブルを持つことで高速な変換とメモリ容量の削減を可能とするという文字コードの変換手法が記載されている。特許文献3には、事前に変換テーブルに対応付けられていない文字コードが発生した際に、新規文字フォント作成や変換テーブルの追加作業を行うという文字コードの変換手法が記載されている。   Patent Document 2 describes a character code conversion method that enables high-speed conversion and memory capacity reduction by having a conversion table only in one direction. Patent Document 3 describes a character code conversion method in which a new character font is created or a conversion table is added when a character code not previously associated with a conversion table is generated.

特開2001−243217号公報JP 2001-243217 A 特開2006−252330号公報JP 2006-252330 A 特開2006−338223号公報JP 2006-338223 A

前述の各特許文献に記載された技術では、特殊文字や外字を含む文字列を正常に変換することは可能ではあるが、その変換処理に多くの手間および時間がかかるという問題がある。   Although the techniques described in each of the above-mentioned patent documents can normally convert a character string including special characters and external characters, there is a problem that the conversion process takes a lot of time and effort.

たとえば特許文献1に記載の技術では、先に特殊文字や外字のみをコード変換した後、通常の文字コードに対するコード変換を行なうという2段階の処理が必要である。また、特許文献1に記載の手法では、特殊文字や外字のコード変換規則のみを変更したい場合にも、通常の文字コードの変換に使用される変換テーブル自体を修正する必要があるという問題がある。   For example, the technique described in Patent Document 1 requires a two-stage process in which only special characters and external characters are first subjected to code conversion and then code conversion is performed on a normal character code. Further, the technique described in Patent Document 1 has a problem that it is necessary to modify the conversion table itself used for conversion of normal character codes even when only the special character or external character code conversion rules are to be changed. .

特許文献2に記載の技術では、片方向のみの変換テーブルしか持たないので、その逆方向の変換は不可能であるか、もしくは処理が著しく遅くなる。特許文献3に記載の技術では、変換処理の時点で新規文字フォント作成や変換テーブルの追加作業を行うので、処理に時間がかかることになる。   Since the technique described in Patent Document 2 has only a conversion table in one direction, conversion in the opposite direction is impossible, or the processing is significantly slowed down. In the technique described in Patent Document 3, since new character font creation and conversion table addition work are performed at the time of conversion processing, it takes time for the processing.

さらに、各文字コードに関する規格はたびたび改正され、その改正によって、人名や地名などで利用される文字の追加、字体の変更や入れ替えが行われることがある(実際、西暦1997年にはJIS規格(JIS X 0208)の改正により、外字の利用が原則的に禁止されたこともある)。そのような場合に、これらの手法では、変換テーブル全体の修正が必要となるという問題もある。特許文献1〜3に記載の技術では、この問題に対応することはできない。   Furthermore, the standards related to each character code are frequently revised, and the revision may add characters used in personal names, place names, etc., and change or replace the fonts (in fact, the JIS standards ( (In some cases, the use of external characters was prohibited in principle due to the revision of JIS X 0208). In such a case, these methods also have a problem that the entire conversion table needs to be corrected. The techniques described in Patent Documents 1 to 3 cannot cope with this problem.

本発明の目的は、特殊文字や外字を含む文字列を迅速かつ正常に変換することを可能とし、かつ字体の変更や入れ替えに容易に対応することを可能とする文字コード変換装置、文字コード変換方法、および文字コード変換プログラムを提供することにある。   An object of the present invention is to provide a character code conversion device and a character code conversion which can quickly and normally convert a character string including special characters and external characters and can easily cope with a change or replacement of a character font. A method and a character code conversion program are provided.

上記目的を達成するため、本発明に係る文字コード変換装置は、入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置であって、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群および変換前後の文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを記憶する外部記憶手段と、起動される時に第1のコード変換テーブル群の中から1つ以上の必要なコード変換テーブルを予め備えられた主記憶手段に第2のコード変換テーブル群として記憶するコード変換処理部と、起動される時に辞書ファイルを読み込み、この辞書ファイル内に定義された変換規則に基づいて第2のコード変換テーブル群の中で変換規則に該当するコード変換テーブルを更新する辞書変換処理部とを有することを特徴とする。   In order to achieve the above object, a character code conversion apparatus according to the present invention is a character code conversion apparatus that converts input character string information before conversion into a converted character string having a different character code, and outputs the converted character string information. A first code conversion table group including a plurality of code conversion tables that define a correspondence relationship between only character codes, and a dictionary file that defines conversion rules that correspond to arbitrary character strings between character codes before and after conversion External storage means for storing, and code stored as a second code conversion table group in main storage means provided in advance with one or more necessary code conversion tables from the first code conversion table group when activated Reads the dictionary file when activated with the conversion processing unit, and converts it in the second code conversion table group based on the conversion rules defined in this dictionary file It characterized by having a dictionary conversion processing unit for updating the code conversion table corresponding to the law.

上記目的を達成するため、本発明に係る文字コード変換方法は、入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置にあって、文字コード変換装置が起動される時に、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群をコード変換処理部が予め備えられた外部記憶手段から読み込み、読み込まれた第1のコード変換テーブル群の中から1つ以上の必要なコード変換テーブルをコード変換処理部が予め備えられた主記憶手段に第2のコード変換テーブル群として記憶し、第1のコード変換テーブル群に続いて変換前後の文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを外部記憶手段から辞書変換処理部が読み込み、この辞書ファイル内に定義された変換規則に基づいて第2のコード変換テーブル群の中で変換規則に該当するコード変換テーブルを辞書変換処理部が更新することを特徴とする。   In order to achieve the above object, a character code conversion method according to the present invention is a character code conversion device that converts input character string information before conversion into a converted character string having a different character code and outputs the character code. When the conversion device is activated, a first code conversion table group including a plurality of code conversion tables defining a correspondence relationship between character codes in only one direction is read from an external storage means provided in advance with a code conversion processing unit. One or more necessary code conversion tables from the read first code conversion table group are stored as a second code conversion table group in the main storage means provided in advance in the code conversion processing unit, Following the code conversion table group, a dictionary file defining a conversion rule corresponding to an arbitrary character string between character codes before and after conversion is converted from the external storage means to the dictionary conversion process. Department reads the code conversion table corresponding to the conversion rule in the second code conversion table group based on the defined conversion rule into the dictionary file dictionary conversion processing unit and updates.

上記目的を達成するため、本発明に係る文字コード変換プログラムは、入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置にあって、文字コード変換装置が備えているコンピュータに、文字コード変換装置が起動される時に、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群を予め備えられた外部記憶手段から読み込む手順、読み込まれた第1のコード変換テーブル群の中から1つ以上の必要なコード変換テーブルを予め備えられた主記憶手段に第2のコード変換テーブル群として記憶する手順、第1のコード変換テーブル群に続いて変換前後の文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを外部記憶手段から読み込む手順、およびこの辞書ファイル内に定義された変換規則に基づいて第2のコード変換テーブル群の中で変換規則に該当するコード変換テーブルを更新する手順を実行させることを特徴とする。   In order to achieve the above object, a character code conversion program according to the present invention is a character code conversion apparatus that converts input character string information before conversion into a converted character string having a different character code and outputs the character code. When the character code conversion device is activated, the computer provided in the conversion device is preliminarily provided with a first code conversion table group including a plurality of code conversion tables that define correspondences between character codes in only one direction. A procedure for reading from the external storage means, and a procedure for storing one or more necessary code conversion tables from the read first code conversion table group as a second code conversion table group in a main storage means provided in advance. A dictionary file that defines a conversion rule that corresponds to an arbitrary character string between character codes before and after conversion following the first code conversion table group A procedure for reading from the partial storage means, and a procedure for updating the code conversion table corresponding to the conversion rule in the second code conversion table group based on the conversion rule defined in the dictionary file. To do.

上述したように本発明は、文字コード変換装置の起動時に、辞書ファイルに定義されている変換規則によってコード変換テーブルを更新するように構成したので、この装置が動作している間は通常の片方向のみの文字コード変換と同じ手間で変換処理が可能となる。これによって、特殊文字や外字を含む文字列を迅速かつ正常に変換することが可能であり、かつ字体の変更や入れ替えに容易に対応することも可能であるという優れた特徴を持つ文字コード変換装置、文字コード変換方法、および文字コード変換プログラムを提供することができる。   As described above, the present invention is configured to update the code conversion table according to the conversion rules defined in the dictionary file when the character code conversion apparatus is started up. Conversion processing can be performed with the same effort as character code conversion in only the direction. This makes it possible to quickly and normally convert character strings including special characters and external characters, and to easily change and replace fonts. A character code conversion method and a character code conversion program can be provided.

本発明の第1の実施形態に係る文字コード変換装置の構成を示す説明図である。It is explanatory drawing which shows the structure of the character code converter based on the 1st Embodiment of this invention. 図1で示した変換前文字列情報のより詳しいデータ構成を示す説明図である。It is explanatory drawing which shows the more detailed data structure of the character string information before conversion shown in FIG. 図1で示したコード変換テーブル群の持つ複数のコード変換テーブルで可能な変換方向の例について示す表である。3 is a table showing an example of conversion directions that are possible in a plurality of code conversion tables included in the code conversion table group shown in FIG. 1. 図1で示した辞書ファイルによる変換規則の定義と、この定義のコード変換テーブル群への反映の一例を示す説明図である。It is explanatory drawing which shows an example of the definition of the conversion rule by the dictionary file shown in FIG. 1, and reflection to this code conversion table group. 図1で示したコード変換手段が起動される際の処理について示すフローチャートである。It is a flowchart shown about the process at the time of the code conversion means shown in FIG. 1 being started. 図1で示したコード変換手段が文字コードの変換を行う際の処理について示すフローチャートである。It is a flowchart shown about the process at the time of the code conversion means shown in FIG. 1 converting a character code. 本発明の第2の実施形態に係る文字コード変換装置の構成を示す説明図である。It is explanatory drawing which shows the structure of the character code conversion apparatus which concerns on the 2nd Embodiment of this invention. 図7で示した辞書更新処理部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the dictionary update process part shown in FIG. コンピュータネットワークで文字コードの変換が利用される場面の一例を示す説明図である。It is explanatory drawing which shows an example of the scene where conversion of a character code is utilized in a computer network.

(第1の実施形態)
以下、本発明の第1の実施形態の構成について添付図1に基づいて説明する。
最初に、本実施形態の基本的な内容について説明し、その後でより具体的な内容について説明する。
本実施形態に係る文字コード変換装置10は、入力された変換前文字列情報31を文字コードの異なる変換後文字列32に変換して出力する文字コード変換装置である。この文字コード変換装置10は、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群41および変換前後の文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイル42を記憶する外部記憶手段14と、起動される時に第1のコード変換テーブル群の中から1つ以上の必要なコード変換テーブルを予め備えられた主記憶手段12に第2のコード変換テーブル群41Bとして記憶するコード変換処理部51と、起動される時に辞書ファイル42を読み込み、この辞書ファイル内に定義された変換規則に基づいて第2のコード変換テーブル群41Bの中で変換規則に該当するコード変換テーブルを更新する辞書変換処理部52とを有する。
(First embodiment)
Hereinafter, the structure of the 1st Embodiment of this invention is demonstrated based on attached FIG.
First, the basic content of the present embodiment will be described, and then more specific content will be described.
The character code conversion device 10 according to the present embodiment is a character code conversion device that converts input character string information 31 before conversion into a converted character string 32 having a different character code and outputs the converted character string information 31. The character code conversion device 10 includes a first code conversion table group 41 including a plurality of code conversion tables that define a correspondence relationship between character codes in only one direction, and an arbitrary character string between character codes before and after conversion. A main memory preliminarily provided with external storage means 14 for storing a dictionary file 42 that defines corresponding conversion rules and one or more necessary code conversion tables from the first code conversion table group when activated. The code conversion processing unit 51 stored in the means 12 as the second code conversion table group 41B, and the dictionary file 42 is read when activated, and the second code conversion table based on the conversion rule defined in the dictionary file. And a dictionary conversion processing unit 52 for updating a code conversion table corresponding to the conversion rule in the group 41B.

ここで、変換前文字列情報31が、変換前文字列31Aと、変換前後の文字コード種類を定義する変換方向情報31Bとを含み、コード変換処理部51が、変換前文字列情報31が入力された際に変換方向情報31Bに対応するコード変換テーブルを第2のコード変換テーブル群41Bから検索して変換前文字列に対応する変換後文字列を出力する。   Here, the pre-conversion character string information 31 includes a pre-conversion character string 31A and conversion direction information 31B that defines the character code types before and after conversion, and the code conversion processing unit 51 inputs the pre-conversion character string information 31. When this is done, a code conversion table corresponding to the conversion direction information 31B is retrieved from the second code conversion table group 41B, and a post-conversion character string corresponding to the pre-conversion character string is output.

そして第2のコード変換テーブル群41Bが、第1のコード変換テーブルおよび第1のコード変換テーブルと逆方向の文字コード間の対応関係を定義した第2のコード変換テーブルとを含む。   The second code conversion table group 41B includes a first code conversion table and a second code conversion table that defines the correspondence between the first code conversion table and the character code in the reverse direction.

この構成を備えることにより、文字コード変換装置10は、特殊文字や外字を含む文字列を迅速かつ正常に変換することが可能となる。
以下、これをより詳細に説明する。
With this configuration, the character code conversion device 10 can quickly and normally convert a character string including special characters and external characters.
Hereinafter, this will be described in more detail.

図1は、本発明の第1の実施形態に係る文字コード変換装置10のハードウェアとしての構成を示す説明図である。文字コード変換装置10は、一般的なコンピュータ装置であり、コンピュータプログラムを実行する主体となる主演算制御手段(CPU: Central Processing Unit)11と、データを記憶する主記憶手段(RAM)12と、動作中のアプリケーションソフトの動作状態を記憶するアプリ状態記憶手段13と、ハードディスクなどのような外部記憶手段14、15と、ユーザからの入力操作を受け付けるキーボードなどの入力手段16と、ユーザに処理結果を表示するディスプレイなどの出力手段17とを備える。主記憶手段12とアプリ状態記憶手段13は物理的には同一の記憶手段でよいし、同様に外部記憶手段14および15は物理的には同一の記憶手段でよい。   FIG. 1 is an explanatory diagram showing a hardware configuration of the character code conversion apparatus 10 according to the first embodiment of the present invention. The character code conversion device 10 is a general computer device, and is a main operation control means (CPU: Central Processing Unit) 11 which is a main body for executing a computer program, a main storage means (RAM) 12 for storing data, Application state storage means 13 for storing the operating state of the application software being operated, external storage means 14 and 15 such as a hard disk, input means 16 such as a keyboard for accepting an input operation from the user, and processing results to the user And an output means 17 such as a display for displaying. The main storage unit 12 and the application state storage unit 13 may be physically the same storage unit. Similarly, the external storage units 14 and 15 may be physically the same storage unit.

主演算制御手段11は、ワードプロセッサ、表計算、ウェブブラウザなどのような一般的なアプリケーションソフト21を動作させて、その動作状態をアプリ状態記憶手段13に記憶している。アプリケーションソフト21は入力手段16を介してユーザに操作され、その処理結果を出力手段17に表示するが、その処理の過程で必要に応じてコード変換手段22を利用する。アプリケーションソフト21からの呼び出しに応じて、主演算制御手段11上でコード変換手段22が動作し、これにアプリケーションソフト21が変換前文字列情報31を入力する。コード変換手段22は、変換前文字列情報31を文字コードの異なる変換後文字列32に変換して、これをアプリケーションソフト21に返すソフトウェアである。変換後文字列32を受けたアプリケーションソフト21は、アプリ状態記憶手段13から主演算制御手段11上に戻って動作を継続する。   The main arithmetic control unit 11 operates general application software 21 such as a word processor, spreadsheet, web browser, and the like, and stores the operation state in the application state storage unit 13. The application software 21 is operated by the user via the input unit 16 and the processing result is displayed on the output unit 17. The code conversion unit 22 is used as necessary in the course of the processing. In response to the call from the application software 21, the code conversion means 22 operates on the main arithmetic control means 11, and the application software 21 inputs the pre-conversion character string information 31 thereto. The code conversion means 22 is software that converts the pre-conversion character string information 31 into a post-conversion character string 32 having a different character code and returns it to the application software 21. The application software 21 that has received the converted character string 32 returns from the application state storage unit 13 to the main arithmetic control unit 11 and continues its operation.

そして外部記憶手段14には、コード変換手段22が後述の処理を行う際に参照するデータであるコード変換テーブル群41が記憶されている。同様に外部記憶手段15には、コード変換手段22が後述の処理を行う際に参照するデータである辞書ファイル42が記憶されている。コード変換テーブル群41および辞書ファイル42の内容については後述する。   The external storage unit 14 stores a code conversion table group 41 that is data to be referred to when the code conversion unit 22 performs processing described later. Similarly, the external storage means 15 stores a dictionary file 42 that is data to be referred to when the code conversion means 22 performs processing described later. The contents of the code conversion table group 41 and the dictionary file 42 will be described later.

コード変換手段22は、コード変換処理部51と、辞書変換処理部52という各機能部からなる。コード変換処理部51は、コード変換テーブル群41を外部記憶手段14から読み出して、主記憶手段12にコード変換テーブル群41Bとして記憶する。そしてアプリケーションソフト21から変換前文字列情報31が入力されると、コード変換処理部51はコード変換テーブル群41のデータを参照して変換後の文字コードを取得して、それによって変換後文字列32に変換する処理を行う。   The code conversion means 22 is composed of functional units, a code conversion processing unit 51 and a dictionary conversion processing unit 52. The code conversion processing unit 51 reads the code conversion table group 41 from the external storage unit 14 and stores it in the main storage unit 12 as the code conversion table group 41B. When the pre-conversion character string information 31 is input from the application software 21, the code conversion processing unit 51 refers to the data in the code conversion table group 41 to acquire the converted character code, and thereby converts the converted character string. The process of converting to 32 is performed.

辞書変換処理部52は、外部記憶手段15から辞書ファイル42のデータを読み出してこれを参照して、そこに定義されている情報に基づいて主記憶手段12上のコード変換テーブル群41Bを更新する。この処理の詳細についても後述する。   The dictionary conversion processing unit 52 reads the data of the dictionary file 42 from the external storage means 15, refers to this, and updates the code conversion table group 41B on the main storage means 12 based on the information defined therein. . Details of this processing will also be described later.

図2は、図1で示した変換前文字列情報31のより詳しいデータ構成を示す説明図である。変換前文字列情報31は、変換前文字列31Aと、変換前後の文字コード種類をたとえば「ユニコード→シフトJIS」のように定義する変換方向情報31Bとを含む。変換後文字列32は、変換前文字列31Aを変換方向情報31Bに従って変換した後の文字列である。   FIG. 2 is an explanatory diagram showing a more detailed data structure of the pre-conversion character string information 31 shown in FIG. The pre-conversion character string information 31 includes a pre-conversion character string 31A and conversion direction information 31B that defines a character code type before and after conversion, for example, “Unicode → Shift JIS”. The post-conversion character string 32 is a character string after the pre-conversion character string 31A is converted according to the conversion direction information 31B.

図3は、図1で示したコード変換テーブル群41および41Bの持つ各々のコード変換テーブルで可能な変換方向の例について示す表である。一つのコード変換テーブルは、たとえば「ユニコード→シフトJIS」のように片方向の変換のみが可能となっている。このため、コード変換テーブル群41は、「ユニコード→シフトJIS」「シフトJIS→ユニコード」「ユニコード→EUC」「EUC→ユニコード」などのような片方向のみの変換を行なう複数のコード変換テーブルを含む。図3では、変換前後の文字コード種類が同一であっても、JIS年度種別が異なれば字形などが異なる場合があるため、変換前後の文字コード種類とJIS年度種別とを合わせて示している。   FIG. 3 is a table showing examples of possible conversion directions in the respective code conversion tables of the code conversion table groups 41 and 41B shown in FIG. One code conversion table can be converted only in one direction, for example, “Unicode → Shift JIS”. For this reason, the code conversion table group 41 includes a plurality of code conversion tables for performing conversion in only one direction, such as “Unicode → Shift JIS”, “Shift JIS → Unicode”, “Unicode → EUC”, “EUC → Unicode”, and the like. . In FIG. 3, even if the character code types before and after conversion are the same, if the JIS year type is different, the character shape and the like may be different. Therefore, the character code types before and after conversion and the JIS year type are shown together.

コード変換テーブル群41Bは、コード変換テーブル群41の中で、あらかじめ定義された必要なコード変換テーブルのみを抽出したものである。ここでは「ユニコード→シフトJIS」「シフトJIS→ユニコード」のみを抽出している。   The code conversion table group 41B is obtained by extracting only the necessary code conversion table defined in advance from the code conversion table group 41. Here, only “Unicode → Shift JIS” and “Shift JIS → Unicode” are extracted.

図4は、図1で示した辞書ファイル42による変換規則の定義と、この定義のコード変換テーブル群41Bへの反映の一例を示す説明図である。辞書ファイル42では、任意の変換規則を定義することができ、かつ複数のコード変換テーブルに関する変換規則を定義できる。なお、ここでいう辞書ファイル42は、たとえばマイクロソフト社製のMS−IMEや、ジャストシステム(株)製のATOK(登録商標)などの日本語入力メソッドで、入力されたかな文字列を漢字仮名交じり文字列に変換する際に利用される辞書ファイルとは特に関係はない。   FIG. 4 is an explanatory diagram showing an example of the conversion rule definition by the dictionary file 42 shown in FIG. 1 and the reflection of this definition on the code conversion table group 41B. In the dictionary file 42, arbitrary conversion rules can be defined, and conversion rules concerning a plurality of code conversion tables can be defined. Note that the dictionary file 42 here is a Japanese input method such as MS-IME manufactured by Microsoft Corporation or ATOK (registered trademark) manufactured by JustSystems Corporation. It is not particularly related to the dictionary file used when converting to a column.

例えば、図4に示した例では、ユニコードの3042「あ」をシフトJISの82A9「か」に対応付ける定義、あるいはユニコードの3055「さ」をシフトJISの82BD「た」に対応付ける定義が記載されている。この「あ」→「か」、「さ」→「た」の対応付けは一例として記載したに過ぎず、実際にはユニコード側とシフトJIS側で共に特殊文字や外字などを含む任意の文字間の対応を変換規則として定義することができる。辞書変換処理部52は、この辞書ファイル42で定義された変換規則を、コード変換テーブル群41Bの中でこの変換方向(ここでは「ユニコード→シフトJIS」)に該当するコード変換テーブルに反映する。   For example, in the example shown in FIG. 4, a definition that associates Unicode 3042 “A” with the shift JIS 82A9 “ka” or a definition that associates Unicode 3055 “sa” with the shift JIS 82BD “ta” is described. Yes. This association of “A” → “ka”, “sa” → “ta” is only described as an example. Actually, between the Unicode side and the shift JIS side, any character including special characters, external characters, etc. Can be defined as a conversion rule. The dictionary conversion processing unit 52 reflects the conversion rule defined in the dictionary file 42 in the code conversion table corresponding to this conversion direction (here, “Unicode → Shift JIS”) in the code conversion table group 41B.

図5は、図1で示したコード変換手段22が起動される際の処理について示すフローチャートである。その起動の際、コード変換処理部51は、コード変換テーブル群41を外部記憶手段14から読み出して、コード変換テーブル群41Bとして主記憶手段12に記憶する(ステップS101)。   FIG. 5 is a flowchart showing processing when the code converting means 22 shown in FIG. 1 is activated. At the time of activation, the code conversion processing unit 51 reads the code conversion table group 41 from the external storage unit 14 and stores it in the main storage unit 12 as the code conversion table group 41B (step S101).

その際、コード変換処理部51は、コード変換テーブル群41の全てのデータを読み出してコード変換テーブル群41Bとして記憶するのではなく、必要なもののみをあらかじめ定義しておいて読み込むようにすることができる。本実施形態では、ある変換方向とその逆方向に対応するコード変換テーブルをコード変換テーブル群41から抽出し、コード変換テーブル群41Bとして記憶する。これによって、特定の文字コード間について、相互間での文字コードの変換処理を可能としている。   At that time, the code conversion processing unit 51 does not read out all the data of the code conversion table group 41 and stores it as the code conversion table group 41B, but reads only necessary data in advance. Can do. In the present embodiment, a code conversion table corresponding to a certain conversion direction and the opposite direction is extracted from the code conversion table group 41 and stored as a code conversion table group 41B. This enables character code conversion processing between specific character codes.

コード変換処理部51がコード変換テーブル群41Bを主記憶手段12に記憶した後、辞書変換処理部52は辞書ファイル42が外部記憶手段15上に存在するか否かを確認する。(ステップS102)。辞書ファイル42が存在する場合は、辞書変換処理部52が辞書ファイル42に定義されている図4に示した変換規則の定義を読み込み(ステップS103)、ステップS104以降の処理を継続する。ステップS102で辞書ファイル42が存在しない場合は、そこで処理を終了する。   After the code conversion processing unit 51 stores the code conversion table group 41B in the main storage unit 12, the dictionary conversion processing unit 52 checks whether the dictionary file 42 exists on the external storage unit 15. (Step S102). If the dictionary file 42 exists, the dictionary conversion processing unit 52 reads the definition of the conversion rule shown in FIG. 4 defined in the dictionary file 42 (step S103), and continues the processing after step S104. If the dictionary file 42 does not exist in step S102, the process ends there.

その後、辞書変換処理部52は、コード変換テーブル群41Bで読み込む複数のコード変換テーブルのうち、どのコード変換テーブルの定義内容を更新するのかを判断する(ステップS104)。   Thereafter, the dictionary conversion processing unit 52 determines which code conversion table definition content is to be updated among a plurality of code conversion tables read by the code conversion table group 41B (step S104).

ここで、定義内容を更新するコード変換テーブルの判断は、辞書ファイル42に定義している変換方向と一致するコード変換テーブルをコード変換テーブル群41Bから検索することで行なう。例えば、辞書ファイル42に「ユニコード→シフトJIS」と定義されている場合、この「ユニコード→シフトJIS」の変換方向のコード変換テーブルをコード変換テーブル群41Bから検索する。   Here, the code conversion table for updating the definition content is determined by searching the code conversion table group 41B for a code conversion table that matches the conversion direction defined in the dictionary file. For example, when “unicode → shift JIS” is defined in the dictionary file 42, a code conversion table in the conversion direction of “unicode → shift JIS” is searched from the code conversion table group 41B.

更新するコード変換テーブルを検出した後、辞書変換処理部52は、辞書ファイル42に定義されている内容でコード変換テーブル群41Bを更新する。(ステップS105)以上で、コード変換手段22の起動の処理が完了する。   After detecting the code conversion table to be updated, the dictionary conversion processing unit 52 updates the code conversion table group 41 </ b> B with the contents defined in the dictionary file 42. (Step S105) This completes the activation process of the code conversion means 22.

ステップS105で行なっているコード変換テーブル群41Bの更新では、辞書変換処理部52が辞書ファイル42に定義されている複数の定義を読み込み、その内容でコード変換テーブル群41Bで持っているコード変換テーブルの内容を更新する。   In the update of the code conversion table group 41B performed in step S105, the dictionary conversion processing unit 52 reads a plurality of definitions defined in the dictionary file 42, and the code conversion table held in the code conversion table group 41B with the contents thereof. Update the contents of.

この際、コード変換テーブル群41Bは、図3に示したように「ユニコード→シフトJIS」などのような片方向の変換のみを保持したコード変換テーブルを複数持っているため、辞書変換処理部52は、辞書ファイル42に定義されている変換方向と一致するコード変換テーブルをコード変換テーブル群41Bから検索する。   At this time, the code conversion table group 41B has a plurality of code conversion tables holding only one-way conversion such as “Unicode → Shift JIS” as shown in FIG. Searches the code conversion table group 41B for a code conversion table that matches the conversion direction defined in the dictionary file.

例えば、辞書ファイル42に「ユニコード→シフトJIS」の文字の対応関係が定義されている場合、この「ユニコード→シフトJIS」の変換方向のコード変換テーブルをコード変換テーブル群41Bから検索して取得し、このコード変換テーブルを取得した後、辞書ファイル42で定義されている内容でこのコード変換テーブルの内容を更新する。   For example, when the correspondence relationship of the characters “Unicode → Shift JIS” is defined in the dictionary file 42, the code conversion table of the conversion direction of “Unicode → Shift JIS” is retrieved from the code conversion table group 41B and acquired. After acquiring this code conversion table, the contents of this code conversion table are updated with the contents defined in the dictionary file 42.

図6は、図1で示したコード変換手段22が文字コードの変換を行う際の処理について示すフローチャートである。アプリケーションソフト21からコード変換手段22に対して変換前文字列情報31(変換前文字列31Aおよび変換方向情報31B)が入力される(ステップS201)と、コード変換処理部51が入力された変換前文字列31Aを変換方向情報31Bに従って変換する処理を開始する。   FIG. 6 is a flowchart showing processing when the code conversion means 22 shown in FIG. 1 converts character codes. When pre-conversion character string information 31 (pre-conversion character string 31A and conversion direction information 31B) is input from the application software 21 to the code conversion means 22 (step S201), the code conversion processing unit 51 inputs the pre-conversion The process of converting the character string 31A according to the conversion direction information 31B is started.

その際、コード変換処理部51がコード変換テーブル群41B内で保持しているコード変換テーブルについて、アプリケーションから入力された変換方向情報31B、たとえば「ユニコード→シフトJIS」などの変換方向に対応するコード変換テーブルをコード変換テーブル群41Bから検索する(ステップS202)。   At this time, with respect to the code conversion table held in the code conversion table group 41B by the code conversion processing unit 51, conversion direction information 31B input from the application, for example, a code corresponding to the conversion direction such as “Unicode → Shift JIS”. A conversion table is searched from the code conversion table group 41B (step S202).

その後、コード変換処理部51が取得したコード変換テーブルを参照し、変換前の文字コードに対応する文字コードをコード変換テーブルから取得して(ステップS203)、その取得後、取得した文字コードに対応する変換後文字列32をアプリケーションソフト21に出力する(ステップS204)。以上、図6で説明した処理は、特殊文字や外字などを含まない通常の文字列に対する文字コードの変換処理と同一である。   Thereafter, the code conversion processing unit 51 refers to the code conversion table acquired, acquires the character code corresponding to the character code before conversion from the code conversion table (step S203), and corresponds to the acquired character code after the acquisition. The converted character string 32 is output to the application software 21 (step S204). The processing described in FIG. 6 is the same as the character code conversion processing for a normal character string that does not include special characters or external characters.

(より具体的な動作例)
次に、本実施形態をより具体的な動作例によって説明する。図5に示したコード変換手段22が起動される際の処理で、辞書ファイル42が外部記憶手段14上に存在し、かつその辞書ファイル42には「ユニコード→シフトJIS」という変換方向が定義されているものとする。コード変換手段22は、コード変換テーブル群41を外部記憶手段14から読み出して、コード変換テーブル群41Bとして主記憶手段12に記憶する(ステップS101)。
(More specific operation example)
Next, the present embodiment will be described with a more specific operation example. In the process when the code conversion means 22 shown in FIG. 5 is activated, the dictionary file 42 exists on the external storage means 14 and the conversion direction “Unicode → Shift JIS” is defined in the dictionary file 42. It shall be. The code conversion means 22 reads the code conversion table group 41 from the external storage means 14 and stores it in the main storage means 12 as the code conversion table group 41B (step S101).

一つのコード変換テーブルは、たとえば「ユニコード→シフトJIS」のように片方向の変換のみが可能となっている。このため、コード変換テーブル群41は、図3に示したように「ユニコード→シフトJIS」「シフトJIS→ユニコード」「ユニコード→EUC」「EUC→ユニコード」などのような片方向のみの変換を行なうコード変換テーブルを複数保持している。   One code conversion table can be converted only in one direction, for example, “Unicode → Shift JIS”. Therefore, the code conversion table group 41 performs unidirectional conversion such as “Unicode → Shift JIS”, “Shift JIS → Unicode”, “Unicode → EUC”, “EUC → Unicode”, etc., as shown in FIG. Holds multiple code conversion tables.

コード変換処理部51は、コード変換テーブル群41の全てのデータを読み出してコード変換テーブル群41Bとして記憶するのではなく、必要なもののみをあらかじめ定義しておいて読み込むようにすることができるので、ここでは「ユニコード→シフトJIS」と「シフトJIS→ユニコード」のみをコード変換テーブル群41Bとして主記憶手段12に記憶する。   Since the code conversion processing unit 51 does not read out all the data of the code conversion table group 41 and stores it as the code conversion table group 41B, it can define and read only necessary data in advance. Here, only “Unicode → Shift JIS” and “Shift JIS → Unicode” are stored in the main memory 12 as the code conversion table group 41B.

このように定義すれば、ユニコードとシフトJISとの相互間で文字コードの変換処理が可能である。図9で説明したように、ある文字列を別の文字コードに変換して別の装置に渡して処理させると、多くの場合、返って来た処理結果の文字列を逆方向で変換することが必要となるので、特定の文字コード間で相互に変換処理を可能とすることが望ましい。   If defined in this way, a character code conversion process can be performed between Unicode and Shift JIS. As described in FIG. 9, when a character string is converted into another character code and passed to another device for processing, in many cases, the returned character string of the processing result is converted in the reverse direction. Therefore, it is desirable to enable conversion processing between specific character codes.

コード変換処理部51がコード変換テーブル群41Bを主記憶手段12に記憶した後、辞書変換処理部52は辞書ファイル42が外部記憶手段14上に存在するか否かを確認する。(ステップS102)。ここでは、辞書ファイル42が存在しているので、辞書変換処理部52が辞書ファイル42に定義されている定義内容を読み込んで(ステップS103)、ステップS104以降の処理を継続する。   After the code conversion processing unit 51 stores the code conversion table group 41B in the main storage unit 12, the dictionary conversion processing unit 52 checks whether the dictionary file 42 exists on the external storage unit 14. (Step S102). Here, since the dictionary file 42 exists, the dictionary conversion processing unit 52 reads the definition content defined in the dictionary file 42 (step S103), and continues the processing after step S104.

その後、辞書変換処理部52は、コード変換テーブル群41Bで読み込んだ複数のコード変換テーブルのうち、どのコード変換テーブルの定義内容を更新するのかを判断する(ステップS104)。ここでは、辞書ファイル42に定義されている通り、「ユニコード→シフトJIS」の変換方向のコード変換テーブルをコード変換テーブル群41Bから検索する。   Thereafter, the dictionary conversion processing unit 52 determines which code conversion table definition content is to be updated among the plurality of code conversion tables read by the code conversion table group 41B (step S104). Here, as defined in the dictionary file 42, a code conversion table in the conversion direction “Unicode → Shift JIS” is searched from the code conversion table group 41B.

そして辞書変換処理部52は、コード変換テーブル群41Bから「ユニコード→シフトJIS」のコード変換テーブルを検出した後、ここに定義されている内容で主記憶手段12上のコード変換テーブル群41Bを更新する(ステップS105)。   The dictionary conversion processing unit 52 detects the “Unicode → Shift JIS” code conversion table from the code conversion table group 41B, and then updates the code conversion table group 41B on the main storage unit 12 with the contents defined here. (Step S105).

図6に示したコード変換手段22が文字コードの変換を行う際の処理で、やはりこれと同じように、アプリケーションソフト21からコード変換手段22に対して「ユニコード→シフトJIS」という変換方向情報31Bを含む変換前文字列情報31が入力された(ステップS201)ものとする。   In the process when the code conversion means 22 shown in FIG. 6 converts the character code, the conversion direction information 31B “Unicode → Shift JIS” is sent from the application software 21 to the code conversion means 22 in the same manner. It is assumed that the pre-conversion character string information 31 including is input (step S201).

アプリケーションソフト21から変換前文字列情報31が入力されると、コード変換処理部51が入力された変換前文字列31Aを変換方向情報31B=「ユニコード→シフトJIS」に従って変換する。その際、コード変換処理部51がコード変換テーブル群41B内で保持しているコード変換テーブルについて、アプリケーションから入力された変換方向情報31B=「ユニコード→シフトJIS」に対応するコード変換テーブルをコード変換テーブル群41Bから検索する(ステップS202)。   When the pre-conversion character string information 31 is input from the application software 21, the code conversion processing unit 51 converts the pre-conversion character string 31A according to the conversion direction information 31B = “Unicode → Shift JIS”. At this time, with respect to the code conversion table held by the code conversion processing unit 51 in the code conversion table group 41B, the code conversion table corresponding to the conversion direction information 31B = “Unicode → Shift JIS” input from the application is subjected to code conversion. A search is made from the table group 41B (step S202).

その後、コード変換処理部51が取得した「ユニコード→シフトJIS」のコード変換テーブルを参照し、変換前の文字コードに対応する文字コードをコード変換テーブルから取得して(ステップS203)、その取得後、取得した文字コードに対応する変換後文字列32をアプリケーションソフト21に出力する(ステップS204)。   After that, referring to the “Unicode → Shift JIS” code conversion table acquired by the code conversion processing unit 51, the character code corresponding to the character code before conversion is acquired from the code conversion table (step S 203). The converted character string 32 corresponding to the acquired character code is output to the application software 21 (step S204).

(第1の実施形態の全体的な動作)
次に、上記の実施形態の全体的な動作について説明する。本実施形態に係る文字コード変換方法は、入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置10にあって、文字コード変換装置が起動される時に、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群をコード変換処理部が予め備えられた外部記憶手段から読み込み、読み込まれた第1のコード変換テーブル群の中から1つ以上の必要なコード変換テーブルをコード変換処理部が予め備えられた主記憶手段に第2のコード変換テーブル群として記憶し(図5・ステップS101)、第1のコード変換テーブル群に続いて変換前後の文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを外部記憶手段から辞書変換処理部が読み込み(図5・ステップS103)、この辞書ファイル内に定義された変換規則に基づいて第2のコード変換テーブル群の中で変換規則に該当するコード変換テーブルを辞書変換処理部が更新する(図5・ステップS105)。
(Overall operation of the first embodiment)
Next, the overall operation of the above embodiment will be described. The character code conversion method according to the present embodiment is a character code conversion device 10 that converts input character string information before conversion into a converted character string having a different character code and outputs the converted character string information. A first code conversion table group including a plurality of code conversion tables defining a correspondence relationship between character codes in only one direction is read from an external storage means provided in advance with a code conversion processing unit. One or more necessary code conversion tables from one code conversion table group are stored as a second code conversion table group in a main storage means provided in advance with a code conversion processing unit (FIG. 5, step S101). Following the first code conversion table group, a dictionary file defining a conversion rule that is a correspondence of an arbitrary character string between character codes before and after conversion is stored from the external storage means. The book conversion processor reads the code conversion table corresponding to the conversion rule in the second code conversion table group based on the conversion rule defined in the dictionary file (step S103 in FIG. 5). Is updated (FIG. 5, step S105).

ここで、上記各動作ステップについては、これをコンピュータで実行可能にプログラム化し、これらを前記各ステップを直接実行するコンピュータである文字コード変換装置10に実行させるようにしてもよい。
この構成および動作により、本実施形態は以下のような効果を奏する。
Here, each of the above-described operation steps may be programmed to be executable by a computer, and may be executed by the character code conversion apparatus 10 which is a computer that directly executes each of the steps.
With this configuration and operation, the present embodiment has the following effects.

本実施形態では、特許文献1に記載された技術のように2段階の処理でコード変換を行なうのではなく、コード変換手段22が起動される際に辞書ファイル42に定義された内容に基づいてコード変換テーブル群41Bを更新するので、コード変換手段22が動作している間は特殊文字や外字などを含まない通常の文字列に対するコード変換処理と同じ1段階の処理でコード変換を行なうことが可能となり、これによってコード変換の処理を高速に行なうことが可能となる。また、コード変換テーブル群41に対する変更を行うのではなく、辞書ファイル42に定義さえしておけばどのような変換規則も定義できるので、規格の変更による字体の変更や入れ替えにも容易に対応することが可能となる。   In this embodiment, code conversion is not performed in a two-stage process as in the technique described in Patent Document 1, but based on the contents defined in the dictionary file 42 when the code conversion means 22 is activated. Since the code conversion table group 41B is updated, the code conversion can be performed in the same one-stage process as the code conversion process for a normal character string that does not include special characters or external characters while the code conversion means 22 is operating. This makes it possible to perform code conversion processing at high speed. In addition, since any conversion rule can be defined as long as it is defined in the dictionary file 42 instead of making a change to the code conversion table group 41, it can easily cope with a change or replacement of a font due to a change in the standard. It becomes possible.

(第2の実施形態)
第2の実施形態に係る文字コード変換装置310は、第1の実施形態に係る文字コード変換装置10の構成に、辞書ファイルが更新されているか否かを定期的に確認し、更新されていれば第2のコード変換テーブル群の中で変換規則に該当するコード変換テーブルを更新する辞書更新処理部353を追加している。
(Second Embodiment)
The character code conversion device 310 according to the second embodiment periodically checks whether or not the dictionary file has been updated in the configuration of the character code conversion device 10 according to the first embodiment. For example, a dictionary update processing unit 353 for updating the code conversion table corresponding to the conversion rule in the second code conversion table group is added.

これによって、文字コード変換装置310を再起動することなく、変換規則の変更が可能となる。
以下、これをより詳細に説明する。
As a result, conversion rules can be changed without restarting the character code conversion device 310.
Hereinafter, this will be described in more detail.

図7は、本発明の第2の実施形態に係る文字コード変換装置310の構成を示す説明図である。文字コード変換装置310は、図1に示した第1の実施形態に係る文字コード変換装置10のコード変換手段22を、コード変換処理部51および辞書変換処理部52に加えて辞書更新処理部353を有するコード変換手段322に変更した構成としている。これ以外の構成は、第1の実施形態に係る文字コード変換装置310と同一である。   FIG. 7 is an explanatory diagram showing the configuration of the character code conversion apparatus 310 according to the second embodiment of the present invention. In addition to the code conversion processing unit 51 and the dictionary conversion processing unit 52, the character code conversion device 310 adds the code conversion means 22 of the character code conversion device 10 according to the first embodiment shown in FIG. It is set as the structure changed into the code conversion means 322 which has. Other configurations are the same as those of the character code conversion apparatus 310 according to the first embodiment.

図8は、図7で示した辞書更新処理部353の動作を示すフローチャートである。辞書更新処理部353は、辞書ファイル42の更新日付が変化しているかを一定間隔で確認し(ステップS401)、更新日付が変化している場合には外部記憶手段14から辞書ファイル42を読み込み(ステップS402)、読み込んだ内容でコード変換手段22が主記憶手段12上に記憶したコード変換テーブル群41Bを更新する(ステップS403)。   FIG. 8 is a flowchart showing the operation of the dictionary update processing unit 353 shown in FIG. The dictionary update processing unit 353 checks at regular intervals whether the update date of the dictionary file 42 has changed (step S401), and if the update date has changed, reads the dictionary file 42 from the external storage means 14 ( In step S402, the code conversion means 22 updates the code conversion table group 41B stored on the main storage means 12 with the read content (step S403).

辞書更新処理部353によるコード変換テーブル群41Bの更新にかかる処理は、第1の実施形態で説明した辞書変換処理部52による処理と同一である。ただし、この処理は、図5〜7に示したコード変換処理部51および辞書変換処理部52による処理とは独立して行われる。   The processing for updating the code conversion table group 41B by the dictionary update processing unit 353 is the same as the processing by the dictionary conversion processing unit 52 described in the first embodiment. However, this processing is performed independently of the processing by the code conversion processing unit 51 and the dictionary conversion processing unit 52 shown in FIGS.

この点以外は、コード変換手段322の動作は、第1の実施形態として説明したコード変換手段22と同一である。これにより、文字コード変換装置310は、第1の実施形態で説明した効果に加えて、文字コード変換装置310を再起動せずに変換規則の変更が可能となるという効果が生じる。   Except for this point, the operation of the code conversion unit 322 is the same as that of the code conversion unit 22 described as the first embodiment. Thereby, the character code conversion device 310 has an effect that the conversion rule can be changed without restarting the character code conversion device 310 in addition to the effect described in the first embodiment.

これまで本発明について図面に示した特定の実施形態をもって説明してきたが、本発明は図面に示した実施形態に限定されるものではなく、本発明の効果を奏する限り、これまで知られたいかなる構成であっても採用することができる。   The present invention has been described with reference to the specific embodiments shown in the drawings. However, the present invention is not limited to the embodiments shown in the drawings, and any known hitherto provided that the effects of the present invention are achieved. Even if it is a structure, it is employable.

コンピュータ装置もしくはコンピュータネットワークで、文字コードの変換を行うものについて幅広く適用することができる。   The present invention can be widely applied to computer devices or computer networks that perform character code conversion.

10、310 文字コード変換装置
11 主演算制御手段
12 主記憶手段
13 アプリ状態記憶手段
14、15 外部記憶手段
16 入力手段
17 出力手段
21 アプリケーションソフト
22、322 コード変換手段
31 変換前文字列情報
31A 変換前文字列
31B 変換方向情報
32 変換後文字列
41、41B コード変換テーブル群
42 辞書ファイル
51 コード変換処理部
52 辞書変換処理部
353 辞書更新処理部
DESCRIPTION OF SYMBOLS 10,310 Character code converter 11 Main calculation control means 12 Main storage means 13 Application state storage means 14, 15 External storage means 16 Input means 17 Output means 21 Application software 22, 322 Code conversion means 31 Pre-conversion character string information 31A conversion Previous character string 31B Conversion direction information 32 Converted character string 41, 41B Code conversion table group 42 Dictionary file 51 Code conversion processing unit 52 Dictionary conversion processing unit 353 Dictionary update processing unit

Claims (6)

入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置であって、
片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群および変換前後の前記文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを記憶する外部記憶手段と、
起動される時に前記第1のコード変換テーブル群の中から1つ以上の必要な前記コード変換テーブルを予め備えられた主記憶手段に第2のコード変換テーブル群として記憶するコード変換処理部と、
起動される時に前記辞書ファイルを読み込み、この辞書ファイル内に定義された前記変換規則に基づいて前記第2のコード変換テーブル群の中で前記変換規則に該当するコード変換テーブルを更新する辞書変換処理部と
を有することを特徴とする文字コード変換装置。
A character code conversion device that converts input character string information before conversion into a converted character string having a different character code and outputs the converted character string information,
A first code conversion table group including a plurality of code conversion tables that define a correspondence relationship between character codes in only one direction and a conversion rule that is a correspondence of an arbitrary character string between the character codes before and after the conversion are defined. An external storage means for storing dictionary files;
A code conversion processing unit for storing one or more necessary code conversion tables from the first code conversion table group as a second code conversion table group in a main storage unit provided in advance when activated;
Dictionary conversion processing that reads the dictionary file when activated and updates a code conversion table corresponding to the conversion rule in the second code conversion table group based on the conversion rule defined in the dictionary file And a character code conversion device.
前記変換前文字列情報が、変換前文字列と、変換前後の文字コード種類を定義する変換方向情報とを含み、
前記コード変換処理部が、前記変換前文字列情報が入力された際に前記変換方向情報に対応する前記コード変換テーブルを前記第2のコード変換テーブル群から検索して前記変換前文字列に対応する変換後文字列を出力することを特徴とする、請求項1に記載の文字コード変換装置。
The pre-conversion character string information includes a pre-conversion character string and conversion direction information defining character code types before and after conversion,
When the pre-conversion character string information is input, the code conversion processing unit searches the code conversion table corresponding to the conversion direction information from the second code conversion table group and corresponds to the pre-conversion character string. The character code conversion device according to claim 1, wherein the converted character string is output.
前記第2のコード変換テーブル群が、第1のコード変換テーブルおよび前記第1のコード変換テーブルと逆方向の文字コード間の対応関係を定義した第2のコード変換テーブルとを含むことを特徴とする、請求項1に記載の文字コード変換装置。   The second code conversion table group includes a first code conversion table and a second code conversion table that defines a correspondence relationship between character codes in the reverse direction of the first code conversion table. The character code conversion device according to claim 1. 前記辞書ファイルが更新されているか否かを定期的に確認し、更新されていれば前記第2のコード変換テーブル群の中で前記変換規則に該当するコード変換テーブルを更新する辞書更新処理部を有することを特徴とする、請求項1に記載の文字コード変換装置。   A dictionary update processing unit that periodically checks whether or not the dictionary file is updated, and updates the code conversion table corresponding to the conversion rule in the second code conversion table group if updated. The character code conversion device according to claim 1, wherein the character code conversion device is a character code conversion device. 入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置にあって、
前記文字コード変換装置が起動される時に、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群をコード変換処理部が予め備えられた外部記憶手段から読み込み、
読み込まれた前記第1のコード変換テーブル群の中から1つ以上の必要な前記コード変換テーブルを前記コード変換処理部が予め備えられた主記憶手段に第2のコード変換テーブル群として記憶し、
前記第1のコード変換テーブル群に続いて変換前後の前記文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを前記外部記憶手段から辞書変換処理部が読み込み、
この辞書ファイル内に定義された前記変換規則に基づいて前記第2のコード変換テーブル群の中で前記変換規則に該当するコード変換テーブルを辞書変換処理部が更新する
ことを特徴とする文字コード変換方法。
In the character code conversion device for converting the input pre-conversion character string information into a post-conversion character string with a different character code and outputting the converted character string information,
When the character code conversion device is activated, an external storage in which a code conversion processing unit is preliminarily provided with a first code conversion table group including a plurality of code conversion tables that define a correspondence relationship between character codes in only one direction. Read from means,
One or more necessary code conversion tables from the read first code conversion table group are stored as a second code conversion table group in the main storage means provided in advance in the code conversion processing unit,
Following the first code conversion table group, the dictionary conversion processing unit reads a dictionary file defining a conversion rule that is a correspondence of an arbitrary character string between the character codes before and after conversion from the external storage unit,
Character code conversion characterized in that a dictionary conversion processing unit updates a code conversion table corresponding to the conversion rule in the second code conversion table group based on the conversion rule defined in the dictionary file. Method.
入力された変換前文字列情報を文字コードの異なる変換後文字列に変換して出力する文字コード変換装置にあって、
前記文字コード変換装置が備えているコンピュータに、
前記文字コード変換装置が起動される時に、片方向のみの文字コード間の対応関係を定義した複数のコード変換テーブルを含む第1のコード変換テーブル群を予め備えられた外部記憶手段から読み込む手順、
読み込まれた前記第1のコード変換テーブル群の中から1つ以上の必要な前記コード変換テーブルを予め備えられた主記憶手段に第2のコード変換テーブル群として記憶する手順、
前記第1のコード変換テーブル群に続いて変換前後の前記文字コード間での任意の文字列の対応である変換規則を定義する辞書ファイルを前記外部記憶手段から読み込む手順、
およびこの辞書ファイル内に定義された前記変換規則に基づいて前記第2のコード変換テーブル群の中で前記変換規則に該当するコード変換テーブルを更新する手順
を実行させることを特徴とする文字コード変換プログラム。
In the character code conversion device for converting the input pre-conversion character string information into a post-conversion character string with a different character code and outputting the converted character string information,
In the computer provided with the character code converter,
A procedure of reading a first code conversion table group including a plurality of code conversion tables defining a correspondence relationship between character codes in only one direction when the character code conversion device is activated from an external storage means provided in advance;
A procedure for storing one or more necessary code conversion tables from the read first code conversion table group as a second code conversion table group in a main storage means provided in advance;
A procedure for reading from the external storage means a dictionary file that defines a conversion rule corresponding to an arbitrary character string between the character codes before and after conversion following the first code conversion table group;
And a procedure for updating a code conversion table corresponding to the conversion rule in the second code conversion table group based on the conversion rule defined in the dictionary file. program.
JP2010014909A 2010-01-27 2010-01-27 Character code conversion device, character code conversion method and character code conversion program Pending JP2011154495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010014909A JP2011154495A (en) 2010-01-27 2010-01-27 Character code conversion device, character code conversion method and character code conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010014909A JP2011154495A (en) 2010-01-27 2010-01-27 Character code conversion device, character code conversion method and character code conversion program

Publications (1)

Publication Number Publication Date
JP2011154495A true JP2011154495A (en) 2011-08-11

Family

ID=44540414

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010014909A Pending JP2011154495A (en) 2010-01-27 2010-01-27 Character code conversion device, character code conversion method and character code conversion program

Country Status (1)

Country Link
JP (1) JP2011154495A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073560A (en) * 2011-09-29 2013-04-22 Dainippon Printing Co Ltd Character code conversion method and system
WO2014010442A1 (en) 2012-07-13 2014-01-16 日東電工株式会社 On-demand multiple power source management system, on-demand multiple power source management system program and computer-readable recording medium on which said program is recorded
KR20200001826A (en) * 2018-06-28 2020-01-07 주식회사 윤디자인그룹 Method, user terminal and program for providing character candidate corresponding to input character

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271777A (en) * 1994-03-31 1995-10-20 Fujitsu Ltd Character code management system of decentralized information processing system
JPH09152859A (en) * 1995-11-29 1997-06-10 Seiko Epson Corp Printer
JPH1055358A (en) * 1996-05-16 1998-02-24 Fujitsu Ltd Device and method for external character management, and computer readable medium stored with computer program performing external character management
JPH117442A (en) * 1997-06-16 1999-01-12 Nec Software Ltd Automatic external character conversion system in client server system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271777A (en) * 1994-03-31 1995-10-20 Fujitsu Ltd Character code management system of decentralized information processing system
JPH09152859A (en) * 1995-11-29 1997-06-10 Seiko Epson Corp Printer
JPH1055358A (en) * 1996-05-16 1998-02-24 Fujitsu Ltd Device and method for external character management, and computer readable medium stored with computer program performing external character management
JPH117442A (en) * 1997-06-16 1999-01-12 Nec Software Ltd Automatic external character conversion system in client server system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073560A (en) * 2011-09-29 2013-04-22 Dainippon Printing Co Ltd Character code conversion method and system
WO2014010442A1 (en) 2012-07-13 2014-01-16 日東電工株式会社 On-demand multiple power source management system, on-demand multiple power source management system program and computer-readable recording medium on which said program is recorded
KR20200001826A (en) * 2018-06-28 2020-01-07 주식회사 윤디자인그룹 Method, user terminal and program for providing character candidate corresponding to input character
KR102145264B1 (en) * 2018-06-28 2020-08-18 주식회사 윤디자인그룹 Method, user terminal and program for providing character candidate corresponding to input character

Similar Documents

Publication Publication Date Title
JP6922538B2 (en) API learning
KR20060047421A (en) Language localization using tables
JP2016218698A (en) Document conversion program and document conversion method
KR102531507B1 (en) Method, device, equipment and storage medium for outputting information
US9208134B2 (en) Methods and systems for tokenizing multilingual textual documents
US9002772B2 (en) Scalable rule-based processing system with trigger rules and rule evaluator
JP2011154495A (en) Character code conversion device, character code conversion method and character code conversion program
JP2009015395A (en) Dictionary construction support device and dictionary construction support program
JP5979650B2 (en) Method for dividing terms with appropriate granularity, computer for dividing terms with appropriate granularity, and computer program thereof
JP2008226010A (en) Compile method and compile device
JP6723726B2 (en) Input support device
WO2007088902A1 (en) Character processing device, method and program, and recording medium
WO2016031959A1 (en) Migration support device
JP5238560B2 (en) Translation apparatus, method, and program
JP7083473B2 (en) Input support device
JP2010204910A (en) System, method, and program for displaying reciprocal link
US9792197B2 (en) Apparatus and program
CN111279350B (en) System and method for providing globalization features in service management application interfaces
JP5975272B2 (en) List display device, list display method, and program for list display
WO2023171790A1 (en) Text creation assistance device and text creation assistance program
JP2013020539A (en) Multilingual display method and multilingual display program
JP4847210B2 (en) Input conversion learning program, input conversion learning method, and input conversion learning device
JP5483166B2 (en) Document search apparatus, document search method, and program
JP2009230705A (en) Template preparation device, device and method for preparing document data, and program
JP4061283B2 (en) Apparatus, method and program for converting lexical data to data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121112

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131003

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131008

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20140225