JP3408435B2 - Code conversion device and conversion method in FTP server and recording medium recording code conversion program - Google Patents
Code conversion device and conversion method in FTP server and recording medium recording code conversion programInfo
- Publication number
- JP3408435B2 JP3408435B2 JP30763298A JP30763298A JP3408435B2 JP 3408435 B2 JP3408435 B2 JP 3408435B2 JP 30763298 A JP30763298 A JP 30763298A JP 30763298 A JP30763298 A JP 30763298A JP 3408435 B2 JP3408435 B2 JP 3408435B2
- Authority
- JP
- Japan
- Prior art keywords
- ftp
- code
- code conversion
- data
- file
- 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 - Fee Related
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Description
【0001】[0001]
【発明の属する技術分野】本発明は、FTP(File Tra
nsfer Protocol)サーバにおいて2バイトコードを含む
テキストファイルの転送の際に用いるコード変換装置お
よび変換方法に関する。TECHNICAL FIELD The present invention relates to an FTP (File Tra
The present invention relates to a code conversion device and conversion method used when transferring a text file containing a 2-byte code in an nsfer protocol) server.
【0002】[0002]
【従来の技術】FTPのプロトコル規格では、テキスト
ファイル転送時の回線上のデータ表現としてASCII
(American Standard Code for Information Interchan
ge)とEBCDIC(Extended Binary Coded Decimal
Interchange Code)の1バイトコード2種類が規定され
ており、1バイトコードではファイル転送毎に動的に変
換コードを選択することが可能である。しかし、2バイ
トコードについては一切規定されていないため、動的な
変換コード選択が不可能となっている。これは、FTP
が1バイトコードのみを使用する米国で規定されたプロ
トコルであり、2バイトコードについて考慮されていな
いためである。これについて、プロトコル規格(RFC
(Request for Comments)959)の拡張による2バイ
トコードデータ表現の規格化を行うことも必要ではある
が本質的な解とはならない。その理由は、FTPが異機
種コンピュータシステム間のファイル転送手段として2
バイトコードを使用する国でも既に広く普及しており、
これらの普及済みのシステムに対する解とならないため
である。2. Description of the Related Art In the FTP protocol standard, ASCII is used as a data representation on a line when a text file is transferred.
(American Standard Code for Information Interchan
ge) and EBCDIC (Extended Binary Coded Decimal)
Interchange Code) is defined as two types of 1-byte code. With the 1-byte code, a conversion code can be dynamically selected for each file transfer. However, since the 2-byte code is not specified at all, it is impossible to dynamically select the conversion code. This is FTP
Is a protocol defined in the United States that uses only 1-byte code, and 2-byte code is not considered. Regarding this, protocol standards (RFC
Although it is necessary to standardize the 2-byte code data expression by extending (Request for Comments) 959), this is not an essential solution. The reason is that FTP is used as a file transfer means between heterogeneous computer systems.
It is already widely used in countries that use bytecode,
This is because it is not a solution to these popular systems.
【0003】このため、従来FTPによる2バイトコー
ドを含むテキストファイルの転送におけるコード変換処
理は、以下のいずれかの方式によって実現されていた。For this reason, the code conversion process in the transfer of a text file including a 2-byte code by the conventional FTP has been realized by one of the following methods.
【0004】方式1:FTPによるファイル転送はバイ
ナリデータとして転送し、ファイル転送の前あるいは後
で別のコード変換プログラムを実行してコード変換を行
う方式。Method 1: File transfer by FTP is a method of transferring as binary data and executing code conversion by executing another code conversion program before or after file transfer.
【0005】方式2:FTPサーバで事前に相手クライ
アント情報(ホスト名,ユーザ名,ファイル名等)と使
用するコードを関連付けたコード変換対応情報を参照し
てコード変換を行う方式。Method 2: A method in which code conversion is performed in the FTP server by referring to code conversion correspondence information that associates the client information (host name, user name, file name, etc.) with the code to be used in advance.
【0006】方式3:FTPクライアントでファイル転
送時に変換するコードも指定させ、転送前にコード変換
を行う方式。Method 3: A method in which a code to be converted at the time of file transfer is designated by the FTP client and code conversion is performed before the transfer.
【0007】[0007]
【発明が解決しようとする課題】しかし、これらの従来
技術には、次のような問題点があった。However, these conventional techniques have the following problems.
【0008】第1の問題点は、方式1について、定型的
なファイル転送業務以外に利用できず極めて限定された
用途にのみ適用可能な方式であることである。The first problem is that method 1 is a method that can be used only for routine file transfer work and is applicable only to extremely limited uses.
【0009】第2の問題点は、方式2について、事前に
定義済みの相手クライアント以外とは2バイトコード変
換を行うことができず接続可能なFTPクライアントが
限定され、かつ定義済みの相手クライアントとも動的に
は変換コードを選択できないという問題がある。FTP
サーバの場合、ファイル転送相手すなわちFTPクライ
アントを選ぶことができず、様々なコードで動作するF
TPクライアントを想定する必要があり、かつFTPク
ライアントが使用するコードはファイル転送時に初めて
認識可能なため、方式2も適用可能な用途が限定される
方式といえる。A second problem is that in the method 2, the FTP client that cannot be connected to other than the previously defined partner client cannot be connected, and the connectable FTP clients are limited. There is a problem that the conversion code cannot be selected dynamically. FTP
In the case of a server, it is not possible to select the file transfer partner, that is, the FTP client.
Since it is necessary to assume a TP client and the code used by the FTP client can be recognized for the first time at the time of file transfer, it can be said that the method 2 can be applied to a limited application.
【0010】第3の問題点は、方式3について、現在広
く普及しているパーソナルコンピュータやUNIXシス
テムで動作するFTPクライアントには方式3のような
2バイトコード変換機能を持つシステムが殆どないとい
うことである。The third problem is that with regard to method 3, there is almost no system having a 2-byte code conversion function like method 3 in personal computers and FTP clients operating in the UNIX system which are now widely used. Is.
【0011】このため、これら大多数のコード変換機能
を持たないFTPクライアントとのファイル転送を想定
すると、FTPサーバ側で動的に変換コードの選択が可
能な方式を提供する必要があった。したがって、本発明
は、FTPサーバ側で動的に変換コードの選択が可能な
コード変換装置および変換方法を提供することを目的と
する。Therefore, assuming file transfer with most of these FTP clients that do not have a code conversion function, it is necessary to provide a method in which the conversion code can be dynamically selected on the FTP server side. Therefore, an object of the present invention is to provide a code conversion device and a conversion method capable of dynamically selecting a conversion code on the FTP server side.
【0012】[0012]
【課題を解決するための手段】上記課題を解決するた
め、請求項1記載の発明は、FTPサーバとFTPクラ
イアントとの間でデータを転送するデータコネクション
と前記FTPクライアントから前記FTPサーバへ指示
コマンドを転送する制御コネクションとの2本のパスを
使用し、このFTPクライアントからのファイル転送要
求時に指定するFTPサーバ側ファイル名にパラメータ
追加を行い、この追加したパラメータで前記データコネ
クション上のデータの2バイトコードの識別を可能と
し、前記FTPサーバが動作するコンピュータの使用コ
ードへの2バイトコード変換を行う装置であって、前記
制御コネクションを介して前記FTPクライアントから
送信されたFTPプロトコルコマンドを解析し、FTP
サーバ側ファイル名に前記パラメータが指定されている
か否かの検査を行い、指定されている場合このパラメー
タよりファイル転送時のデータの2バイトコードの識別
を行うプロトコル解析部と、前記データコネクションを
介して転送されたデータを、前記パラメータが指定され
ている場合、複数のコード変換テーブルから前記プロト
コル解析部の解析結果に応じて1つのコード変換テーブ
ルを決定し、前記パラメータが指定されていない場合、
ファイル転送前に指示された1バイトコード識別情報か
らコード変換テーブルを決定してコード変換を行うコー
ド変換処理部とを備えることを特徴とする。In order to solve the above-mentioned problems, the invention according to claim 1 provides an FTP server and an FTP client.
Data connection to transfer data to and from the client
And an instruction from the FTP client to the FTP server
Two paths to the control connection that transfers the command
Use, this does parameter added to the FTP server file name specified at the time of the file transfer request from an FTP client, and allows the identification of 2-byte code of the data on the data connection is the additional parameters, the FTP server an apparatus for performing the 2-byte code translation using code computers running analyzes the FTP protocol commands transmitted from the FTP client through the <br/> control connection, FTP
The above parameter is specified in the file name on the server side
This parameter is checked if it is specified.
Identification of 2-byte code of data when transferring files
A protocol analysis section for performing the data transferred via the data connection, the parameter is specified
If it has, it determines one of the code conversion table according a plurality of code conversion tables in the analysis results of the proto <br/> Col analysis unit, when said parameter is not specified,
Is it 1-byte code identification information specified before file transfer?
And a code conversion processing unit that determines a code conversion table and performs code conversion.
【0013】また、請求項2記載の発明は、プロトコル
解析部での解析結果が利用者認証要求であった場合に、
あらかじめ記憶している利用者管理情報を参照して利用
者認証を行い、認証された利用者情報の中に使用する2
バイトコードの識別情報が登録されている場合、この利
用者からのファイル転送処理で使用する2バイトコード
の既定値をこの識別情報により決定することを特徴とし
ている。また、請求項3記載の発明は、コード変換処理
部が、FTPサーバからFTPクライアントへの送信時
には転送ファイルからデータを読み出した直後に、FT
PクライアントからFTPサーバへの受信時には受信デ
ータを転送ファイルへ書き込む直前に行うことを特徴と
している。According to the second aspect of the invention, when the analysis result in the protocol analysis unit is a user authentication request,
Authenticate the user by referring to the user management information stored in advance, and use it in the authenticated user information 2
When the identification information of the bytecode is registered, the predetermined value of the 2-byte code used in the file transfer process from this user is characterized by this identification information. According to the invention of claim 3, the code conversion processing unit immediately after reading the data from the transfer file at the time of transmission from the FTP server to the FTP client,
It is characterized in that when receiving from the P client to the FTP server, it is performed immediately before writing the received data to the transfer file.
【0014】また、請求項4記載の発明は、FTPサー
バとFTPクライアントとの間でデータを転送するデー
タコネクションと前記FTPクライアントから前記FT
Pサーバへ指示コマンドを転送する制御コネクションと
の2本のパスを使用し、このFTPクライアントからの
ファイル転送要求時に指定するFTPサーバ側ファイル
名にパラメータ追加を行い、この追加したパラメータで
前記データコネクション上のデータの2バイトコードの
識別を可能とし、前記FTPサーバが動作するコンピュ
ータの使用コードへの2バイトコード変換を行う方法で
あって、前記制御コネクションを介して前記FTPクラ
イアントから送信されたFTPプロトコルコマンドを解
析し、FTPサーバ側ファイル名に前記パラメータが指
定されているか否かの検査を行い、指定されている場合
このパラメータよりファイル転送時のデータの2バイト
コードの識別を行うプロトコル解析過程と、前記データ
コネクションを介して転送されたデータを、前記パラメ
ータが指定されている場合、複数のコード変換テーブル
から前記プロトコル解析過程での解析結果に応じてコー
ド変換テーブルを決定し、前記パラメータが指定されて
いない場合、ファイル転送前に指示された1バイトコー
ド識別情報からコード変換テーブルを決定してコード変
換を行うコード変換過程とを有することを特徴とする。The invention according to claim 4 is the FTP server.
Data transfer between the client and the FTP client.
Connection and the FTP client to the FT
A control connection that transfers the command to the P server
Using the two paths of , the parameter is added to the file name of the FTP server side specified at the time of file transfer request from this FTP client.
To allow the identification of 2-byte code of the data on the data connection, the A method of performing a 2-byte code translation using the computer code that FTP server is operating, transmitted from the FTP client through the control connection The analyzed FTP protocol command is analyzed, and the parameter is specified in the file name on the FTP server side.
If specified, it is checked whether it is specified
2 bytes of data when transferring a file from this parameter
A protocol analysis process of performing identification code, the data transferred via the data connection, the parameter
If over data is specified to determine the code conversion table according a plurality of code conversion tables in the analysis results for the protocol analysis process, the parameters are specified
If not, the 1-byte code specified before the file transfer
And a code conversion process for performing code conversion by determining a code conversion table from the code identification information .
【0015】また、請求項5記載の発明は、請求項1記
載のFTPサーバにおけるコード変換装置において実行
されるコード変換のためのプログラムを記録した計算機
読み取り可能な記録媒体である。The invention described in claim 5 is a computer-readable recording medium in which a program for code conversion executed in the code conversion device in the FTP server according to claim 1 is recorded.
【0016】[0016]
【発明の実施の形態】以下、図面参照して本発明の実施
形態について説明する。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings.
【0017】まず、本発明の概要について図面を参照し
て説明する。本発明は、異機種コンピュータシステム間
のファイル転送手段として広く普及しているFTPのサ
ービス提供システム(以下、FTPサーバ)において、
FTPサービス利用システム(以下、FTPクライアン
ト)からのファイル転送要求毎に2バイトコード変換種
別を動的に選択できる構成を提供するものである。図1
において、FTPサーバ1とFTPクライアント2の間
には、実際のファイルデータを転送するための通信パス
であるデータコネクション3と、利用者認証やファイル
転送指示などの電文を送受信するための通信パスである
制御コネクション4の2本の通信パスを使用している。
このうち、データコネクション3はファイル転送等で実
際にデータを転送する際のみ開設され転送終了とともに
解放される通信パスであり、制御コネクション4はFT
Pサーバ1とFTPクライアント2が接続している間存
在している。First, an outline of the present invention will be described with reference to the drawings. The present invention provides an FTP service providing system (hereinafter referred to as an FTP server) which is widely used as a file transfer means between different types of computer systems.
The present invention provides a configuration in which a 2-byte code conversion type can be dynamically selected for each file transfer request from an FTP service using system (hereinafter referred to as an FTP client). Figure 1
In the above, between the FTP server 1 and the FTP client 2, there are a data connection 3 which is a communication path for transferring actual file data, and a communication path for transmitting and receiving electronic messages such as user authentication and file transfer instructions. Two communication paths of a certain control connection 4 are used.
Of these, the data connection 3 is a communication path that is opened only when data is actually transferred by file transfer or the like, and is released when the transfer ends, and the control connection 4 is FT.
It exists while the P server 1 and the FTP client 2 are connected.
【0018】FTPクライアント2から制御コネクショ
ン4を介してFTPサーバ1に送信される各種の指示コ
マンドはFTPのプロトコル規格であるRFC959に
て細かく規定されている。図2はRFC959で規定さ
れているFTPプロトコルコマンドの中で本発明に関連
する1バイトコード指示コマンドC1やファイル転送指
示コマンドC2を抜粋したものである。Various instruction commands transmitted from the FTP client 2 to the FTP server 1 through the control connection 4 are finely specified in RFC959 which is a protocol standard of FTP. FIG. 2 is an excerpt of the 1-byte code instruction command C1 and the file transfer instruction command C2 related to the present invention among the FTP protocol commands defined by RFC959.
【0019】FTPでは制御コネクション上の文字コー
ドはASCIIと規定されているが、図2に示すように、1
バイト指示コマンドC1は、“TYPE”<SP><type-code><
CRLF>から構成されている。ここで、“TYPE”は文字
列、<SP>はスペース文字、<type-code>はコード種別を
示す“A”(ASCII)(省略時の既定値),“E”(EBCDI
C),または“I”(イメージデータ)の文字、<CRLF>は
改行文字である。また、ファイル転送指示コマンドC2
は、クライアントへの転送を示す“RETR”,クライアン
トからのファイルの新規/置換を行うための転送を示す
“STOR”,またはクライアントからのファイルの追加格
納を行うための転送“APPE”の文字列と、スペース文字
と、サーバ側のファイル名を示す文字列である<pathnam
e>パラメータと、改行文字とから構成されている。Although the character code on the control connection is defined as ASCII in FTP, as shown in FIG.
The byte instruction command C1 is "TYPE"<SP><type-code><
CRLF>. Here, "TYPE" is a character string, <SP> is a space character, <type-code> is a code type "A" (ASCII) (default when omitted), "E" (EBCDI
C) or "I" (image data) character, <CRLF> is a line feed character. Also, the file transfer instruction command C2
Is a character string of "RETR" indicating transfer to the client, "STOR" indicating transfer for new / replacement of file from client, or transfer "APPE" for additional storage of file from client , A space character, and <pathnam which is a character string indicating the file name on the server side.
It consists of the e> parameter and a newline character.
【0020】図2に示すように、RFC959では2バ
イトコード指示コマンドが規定されておらず、FTPで
ファイルを転送する際、データコネクション3上を流れ
るデータのコードが2バイトコードであっても2バイト
コードを意識してコード変換をFTPサーバ1で行うこ
とは想定されていない。As shown in FIG. 2, RFC 959 does not stipulate a 2-byte code designating command, and when transferring a file by FTP, even if the code of the data flowing on the data connection 3 is a 2-byte code, 2 It is not assumed that the FTP server 1 performs the code conversion in consideration of the byte code.
【0021】しかし、日本その他の2バイトコードを使
用する国では、様々な2バイトコードが広く利用されて
おり、従来より、従来の技術の欄で記述した方式で2バ
イトコードを変換している。しかし、これらの方式はい
ずれも利用範囲が限られており、1バイトコードと同様
ファイル転送時にデータコネクション3上を流れるデー
タのコードを認識してFTPサーバ1上で動的に2バイ
トコード変換を行う方式の提供が広く望まれていた。However, in Japan and other countries that use 2-byte codes, various 2-byte codes are widely used, and conventionally, 2-byte codes are converted by the method described in the section of the prior art. . However, the use range of each of these methods is limited, and like the 1-byte code, the 2-byte code conversion is dynamically performed on the FTP server 1 by recognizing the code of the data flowing on the data connection 3 at the time of file transfer. It has been widely desired to provide a method of doing so.
【0022】そこで、本発明は、RFC959で規定さ
れているファイル転送指示コマンドを拡大解釈し(図
3)、FTPクライアント2からのファイル転送要求時
に指定するFTPサーバ1側ファイル名にパラメータ追
加を行い、この追加したパラメータでデータコネクショ
ン3上のデータの2バイトコードの識別を可能とし、F
TPサーバ1が動作するコンピュータの使用コードへの
2バイトコード変換を行う方式を規定した。本発明は、
このようにして、任意のFTPクライアントとのファイ
ル転送において、動的に任意のコードを選択し2バイト
コード変換を可能にする。Therefore, according to the present invention, the file transfer instruction command specified in RFC959 is expandedly interpreted (FIG. 3), and a parameter is added to the file name on the FTP server 1 side specified at the time of the file transfer request from the FTP client 2. , It is possible to identify the 2-byte code of the data on the data connection 3 with this added parameter.
The method for converting the 2-byte code into the code used by the computer on which the TP server 1 operates has been defined. The present invention is
In this way, in file transfer with an arbitrary FTP client, an arbitrary code is dynamically selected to enable 2-byte code conversion.
【0023】なお、図1に示すプロトコル変換部6、コ
ード変換処理部9等におけるデータ処理は、FTPサー
バを構成するコンピュータによってプログラムを実行す
ることで実現することができ、そのプログラムはコンピ
ュータ読み取り可能な記録媒体に記録して頒布すること
が可能である。The data processing in the protocol conversion unit 6, the code conversion processing unit 9 and the like shown in FIG. 1 can be realized by executing a program by a computer constituting an FTP server, and the program can be read by a computer. It can be recorded on various recording media and distributed.
【0024】次に、本発明の実施形態について詳細に説
明する。図1を参照すると、本発明のFTP通信システ
ムの一実施形態は、FTPサービスを提供するFTPサ
ーバ1とFTPサービスを利用するFTPクライアント
2と、両者間にファイル転送等の実データを転送するデ
ータコネクション3とFTPクライアント2からFTP
サーバ1への各種指示コマンドを転送する制御コネクシ
ョン4の2本の通信パスから構成されている。Next, embodiments of the present invention will be described in detail. Referring to FIG. 1, one embodiment of an FTP communication system of the present invention is that an FTP server 1 that provides an FTP service, an FTP client 2 that uses the FTP service, and data that transfers actual data such as a file transfer between them. Connection 3 and FTP client 2 to FTP
It is composed of two communication paths of the control connection 4 for transferring various instruction commands to the server 1.
【0025】FTPサーバ1は、データコネクション3
および制御コネクション4を介してFTPクライアント
2と通信を行うためのデータ送受信処理部5と、制御コ
ネクション4を介してFTPクライアント2から送信さ
れたFTPプロトコルコマンドを解析するプロトコル解
析部6、解析したプロトコルコマンドが利用者認証要求
であった場合に利用者管理情報8を基に利用者認証処理
を行う利用者認証部7、データコネクション3を介して
転送されたデータを複数のコード変換テーブル1(10
−1),…,コード変換テーブルN(10−N)からな
るコード変換テーブル群10から適切なコード変換テー
ブルを選択してコード変換を行うコード変換処理部9、
および転送ファイル(記憶装置)11とを含む。The FTP server 1 has a data connection 3
And a data transmission / reception processing unit 5 for communicating with the FTP client 2 via the control connection 4, a protocol analysis unit 6 for analyzing the FTP protocol command transmitted from the FTP client 2 via the control connection 4, and the analyzed protocol When the command is a user authentication request, the user authentication unit 7 that performs user authentication processing based on the user management information 8 and the data transferred via the data connection 3 are converted into a plurality of code conversion tables 1 (10).
-1), ..., A code conversion processing unit 9 that performs code conversion by selecting an appropriate code conversion table from the code conversion table group 10 including the code conversion table N (10-N).
And a transfer file (storage device) 11.
【0026】これらの手段はそれぞれ概略つぎのように
動作する。データ送受信処理部5は、データコネクショ
ン3とコード変換処理部9間のデータ送受信処理およ
び、制御コネクション4とプロトコル解析部6間のプロ
トコルコマンド送受信処理を行う。プロトコル解析部6
は、FTPクライアント2から各種処理要求であるプロ
トコルコマンドを解析実行し、その処理結果をプロトコ
ルコマンド応答としてFTPクライアント2へ返信す
る。本発明は、このプロトコル解析部6の構成および動
作を主要な特徴とするものであるが、このプロトコル解
析部6の構成および動作の詳細については後述する。Each of these means operates roughly as follows. The data transmission / reception processing unit 5 performs data transmission / reception processing between the data connection 3 and the code conversion processing unit 9 and protocol command transmission / reception processing between the control connection 4 and the protocol analysis unit 6. Protocol analysis unit 6
Analyzes and executes protocol commands, which are various processing requests, from the FTP client 2, and returns the processing results to the FTP client 2 as a protocol command response. The present invention is mainly characterized by the configuration and operation of the protocol analysis unit 6, and details of the configuration and operation of the protocol analysis unit 6 will be described later.
【0027】利用者認証部7は、プロトコル解析部6で
の解析結果が利用者認証要求であった場合に利用者管理
情報8を参照して利用者認証を行う。この際、認証され
た利用者情報の中に使用する2バイトコードの識別情報
が登録されている場合、この利用者からのファイル転送
処理で使用する2バイトコードの既定値をこの識別情報
により決定しておく。The user authenticating section 7 refers to the user management information 8 to perform user authentication when the analysis result of the protocol analyzing section 6 is a user authentication request. At this time, if the identification information of the 2-byte code to be used is registered in the authenticated user information, the default value of the 2-byte code used in the file transfer process from this user is determined by this identification information. I'll do it.
【0028】コード変換処理部9は、ファイル転送前に
コード変換テーブル群10から使用するコード変換テー
ブルを決定しておき、決定したコード変換テーブルを用
いてコード変換処理を行う。コード変換処理は、FTP
サーバ1からFTPクライアント2への送信時には転送
ファイル11からデータを読み出した直後に、FTPク
ライアント2からFTPサーバ1への受信時には受信デ
ータを転送ファイル11へ書き込む直前に行う。The code conversion processing unit 9 determines a code conversion table to be used from the code conversion table group 10 before file transfer, and performs code conversion processing using the determined code conversion table. Code conversion processing is done by FTP
It is performed immediately after reading the data from the transfer file 11 when transmitting from the server 1 to the FTP client 2, and immediately before writing the received data into the transfer file 11 when receiving from the FTP client 2 to the FTP server 1.
【0029】次に、図1,図2,図3および図4のフロ
ーチャートを参照して本実施形態の全体の動作について
詳細に説明する。Next, the overall operation of this embodiment will be described in detail with reference to the flow charts of FIGS. 1, 2, 3 and 4.
【0030】まず、図2に示す通りFTPのファイル転
送指示コマンドC2は、ファイルの転送方向および格納
方式の識別情報(RETR,STOR,APPEコマンド)と転送ファ
イルのサーバ側ファイル名情報(<pathname>(パス名)
パラメータ)しかない。First, as shown in FIG. 2, the FTP file transfer instruction command C2 includes the identification information (RETR, STOR, APPE command) of the file transfer direction and storage method and the server side file name information (<pathname>) of the transfer file. (Path name)
Parameter) only.
【0031】この<pathname>パラメータを本方式を採用
するFTPサーバでは、図3のように拡大解釈する。す
なわち、P2に示すようにFTPサーバが動作するコン
ピュータのファイルシステムでファイル名として許され
ていない文字をデリミタ文字と規定し、その後に続く文
字で転送データの2バイトコードを指定する。<pathnam
e>パラメータは現在広く普及しているFTPクライアン
トではリモートファイル名としてファイル転送の都度入
力したデータであり本方式を採用したFTPサーバの場
合にリモートファイル名に続けてデリミタ文字と2バイ
トコード識別を入力することになる。In the FTP server adopting this method, the <pathname> parameter is expandedly interpreted as shown in FIG. That is, as shown in P2, a character that is not allowed as a file name in the file system of the computer on which the FTP server operates is defined as a delimiter character, and the character following it specifies the 2-byte code of the transfer data. <pathnam
The e> parameter is the data that is input as a remote file name each time file transfer is performed in the widely used FTP client. In the case of the FTP server that adopts this method, the delimiter character and 2-byte code identification are added after the remote file name. Will be input.
【0032】デリミタ文字としては、サーバのファイル
システムでファイル名への使用が許されていないスペー
ス以外の文字を使用することができる。2バイトコード
識別としては、2バイトコードの種別を示す文字とし
て、例えば、文字“S”でシフトJISコード、文字
“E”でEUC(Exended UNIX Code)コード、文字“U”で
Unicode(ユニコード)を用いることができる。As the delimiter character, a character other than a space which is not allowed to be used in a file name in the file system of the server can be used. The 2-byte code is identified by a character indicating the type of the 2-byte code. For example, the character "S" is a shift JIS code, the character "E" is an EUC (Exended UNIX Code) code, and the character "U" is a character.
Unicode can be used.
【0033】次に、図1のプロトコル解析部6の処理を
本発明に関連する処理について図4のフローチャートを
用いて詳細に説明する。データ送受信処理部5が制御コ
ネクション4を介して受信したFTPクライアント2か
らのプロトコルコマンドを受信するとプロトコル解析部
6に渡される(ステップS1)。次に受信したプロトコ
ルコマンドを解析し、ファイル転送指示コマンドかどう
かを識別する(ステップS2)。ファイル転送指示コマ
ンドでない場合については本発明で特に言及するもので
はなく、それぞれの要求処理の実行を行う(ステップS
3)。ファイル転送指示コマンド、すなわちRETR,STOR,
APPEのいずれかのコマンドであった場合、次に必須パラ
メータである<pathname>パラメータの解析を行う(ステ
ップS4)。Next, the processing of the protocol analysis unit 6 of FIG. 1 will be described in detail with reference to the flowchart of FIG. When the data transmission / reception processing unit 5 receives the protocol command from the FTP client 2 received via the control connection 4, it is passed to the protocol analysis unit 6 (step S1). Next, the received protocol command is analyzed to identify whether it is a file transfer instruction command (step S2). The present invention does not particularly refer to the case where the command is not a file transfer instruction command, and each request process is executed (step S
3). File transfer command, ie RETR, STOR,
If the command is one of APPE, then the <pathname> parameter, which is an essential parameter, is analyzed (step S4).
【0034】次の処理が本発明で新たに追加される処理
で、<pathname>パラメータに図3で記述した拡張パラメ
ータが指定されているかどうかの検査を行い(ステップ
S5)、指定されている場合その拡張パラメータより当
該ファイル転送時のデータの2バイトコードを識別し、
FTPサーバが動作するコンピュータの2バイトコード
とのコード変換に用いるコード変換テーブルを図1のコ
ード変換テーブル群10より決定する(ステップS
6)。<pathname>パラメータに拡張パラメータが指定さ
れていないあるいは形式が不正の場合、ファイル転送前
に指示された1バイトコード識別情報からASCII,EBCDI
C,IMAGE(イメージ)のいずれかのコード変換テーブル
を決定する(ステップS7)。The following processing is newly added in the present invention, and it is checked whether the extension parameter described in FIG. 3 is designated in the <pathname> parameter (step S5), and if it is designated. Identify the 2-byte code of the data at the time of file transfer from the extended parameter,
A code conversion table used for code conversion with the 2-byte code of the computer on which the FTP server operates is determined from the code conversion table group 10 of FIG. 1 (step S
6). If the extended parameter is not specified in the <pathname> parameter or the format is invalid, ASCII, EBCDI is calculated from the 1-byte code identification information specified before the file transfer.
The code conversion table for either C or IMAGE (image) is determined (step S7).
【0035】このようにして決定したコード変換テーブ
ルに基づき、転送ファイル11のコードとデータコネク
ション3間のコード変換処理をコード変換処理部9で行
う(ステップS8)。Based on the code conversion table thus determined, the code conversion processing unit 9 performs the code conversion process between the code of the transfer file 11 and the data connection 3 (step S8).
【0036】[0036]
【発明の効果】第1の効果は、現在広く普及しているF
TPクライアントを相手に2バイトコードの選択ができ
ることにある。その理由は、発明が解決しようとする課
題の欄で記述した通り、現在広く普及しているFTPク
ライアントには2バイトコード変換機能がないためであ
る。第2の効果は、変換する2バイトコードをファイル
転送時に動的に選択できることにある。その理由は、従
来の技術の欄に記述した通り、利用者管理情報等による
静的なコード変換テーブルの対応付けでは適用範囲が定
型的なファイル転送業務のみとなり、任意の時点で任意
のFTPクライアントと任意のファイルについて転送す
る際には適用できないためである。The first effect of the present invention is F, which is currently widespread.
It is possible to select a 2-byte code for a TP client. The reason is that, as described in the section of the problem to be solved by the invention, the FTP client which is now widely used does not have the 2-byte code conversion function. The second effect is that the 2-byte code to be converted can be dynamically selected at the time of file transfer. The reason is, as described in the section of the prior art, in the correspondence of the static code conversion table by the user management information and the like, the scope of application is only the file transfer business of a fixed type, and an arbitrary FTP client at any time. This is because it cannot be applied when transferring any file.
【図1】 本発明の一実施形態を示すブロック図であ
る。FIG. 1 is a block diagram showing an embodiment of the present invention.
【図2】 FTPのプロトコルコマンドの一部を説明す
るための図である。FIG. 2 is a diagram for explaining a part of an FTP protocol command.
【図3】 本発明によって提案されたファイル転送指示
コマンドにおける<pathname>パラメータ形式を示す図で
ある。FIG. 3 is a diagram showing a <pathname> parameter format in a file transfer instruction command proposed by the present invention.
【図4】 本発明の実施形態の動作を示すフローチャー
トである。FIG. 4 is a flowchart showing the operation of the embodiment of the present invention.
1 FTPサーバ 6 プロトコル解析部 9 コード変換処理部 10 コード変換テーブル群 10−1〜10−N コード変換テーブル1〜N 1 FTP server 6 Protocol analysis part 9 Code conversion processing unit 10 Code conversion table group 10-1 to 10-N Code conversion tables 1 to N
Claims (5)
間でデータを転送するデータコネクションと前記FTP
クライアントから前記FTPサーバへ指示コマンドを転
送する制御コネクションとの2本のパスを使用し、この
FTPクライアントからのファイル転送要求時に指定す
るFTPサーバ側ファイル名にパラメータ追加を行い、
この追加したパラメータで前記データコネクション上の
データの2バイトコードの識別を可能とし、前記FTP
サーバが動作するコンピュータの使用コードへの2バイ
トコード変換を行う装置であって、前記 制御コネクションを介して前記FTPクライアント
から送信されたFTPプロトコルコマンドを解析し、F
TPサーバ側ファイル名に前記パラメータが指定されて
いるか否かの検査を行い、指定されている場合このパラ
メータよりファイル転送時のデータの2バイトコードの
識別を行うプロトコル解析部と、前記 データコネクションを介して転送されたデータを、
前記パラメータが指定されている場合、複数のコード変
換テーブルから前記プロトコル解析部の解析結果に応じ
て1つのコード変換テーブルを決定し、前記パラメータ
が指定されていない場合、ファイル転送前に指示された
1バイトコード識別情報からコード変換テーブルを決定
してコード変換を行うコード変換処理部とを備えること
を特徴とするFTPサーバにおけるコード変換装置。1. An FTP server and an FTP client
Data connection for transferring data between the two and the FTP
Transfer the command from the client to the FTP server
Using two paths with the control connection to be sent, add parameters to the file name on the FTP server side specified when requesting a file transfer from this FTP client,
To allow the identification of 2-byte code of the data on the data connection is the additional parameters, the FTP
An apparatus for performing the 2-byte code translation using the computer code for the server to operate analyzes the FTP protocol commands transmitted from the FTP client through the control connection, F
When the parameter is specified in the file name on the TP server side
Inspect whether or not the
The 2-byte code of the data when transferring the file from the meter
A protocol analysis section for performing identification, the data transferred via the data connection,
If the parameter is specified, determines one of the code conversion table according a plurality of code conversion tables in the analysis results of the protocol analyzer, the parameter
Is specified, the file was instructed before the file transfer.
Determine code conversion table from 1-byte code identification information
And a code conversion processing unit that performs code conversion.
認証要求であった場合に、あらかじめ記憶している利用
者管理情報を参照して利用者認証を行い、認証された利
用者情報の中に使用する2バイトコードの識別情報が登
録されている場合、この利用者からのファイル転送処理
で使用する2バイトコードの既定値をこの識別情報によ
り決定することを特徴とする請求項1記載のFTPサー
バにおけるコード変換装置。2. When the analysis result in the protocol analysis unit is a user authentication request, user authentication is performed by referring to the user management information stored in advance, and 2. When the identification information of the 2-byte code used for is registered, the default value of the 2-byte code used in the file transfer process from this user is determined by this identification information. Code conversion device in FTP server.
FTPクライアントへの送信時には転送ファイルからデ
ータを読み出した直後に、FTPクライアントからFT
Pサーバへの受信時には受信データを転送ファイルへ書
き込む直前に行うことを特徴とする請求項1記載のFT
Pサーバにおけるコード変換装置。3. The code conversion processing unit, when transmitting from the FTP server to the FTP client, immediately after reading the data from the transfer file, sends the FT from the FTP client.
2. The FT according to claim 1, wherein when receiving to the P server, it is performed immediately before writing the received data to the transfer file.
Code conversion device in P server.
間でデータを転送するデータコネクションと前記FTP
クライアントから前記FTPサーバへ指示コマンドを転
送する制御コネクションとの2本のパスを使用し、この
FTPクライアントからのファイル転送要求時に指定す
るFTPサーバ側ファイル名にパラメータ追加を行い、
この追加したパラメータで前記データコネクション上の
データの2バイトコードの識別を可能とし、前記FTP
サーバが動作するコンピュータの使用コードへの2バイ
トコード変換を行う方法であって、前記 制御コネクションを介して前記FTPクライアント
から送信されたFTPプロトコルコマンドを解析し、F
TPサーバ側ファイル名に前記パラメータが指定されて
いるか否かの検査を行い、指定されている場合このパラ
メータよりファイル転送時のデータの2バイトコードの
識別を行うプロトコル解析過程と、前記 データコネクションを介して転送されたデータを、
前記パラメータが指定されている場合、複数のコード変
換テーブルから前記プロトコル解析過程での解析結果に
応じてコード変換テーブルを決定し、前記パラメータが
指定されていない場合、ファイル転送前に指示された1
バイトコード識別情報からコード変換テーブルを決定し
てコード変換を行うコード変換過程とを有することを特
徴とするFTPサーバにおけるコード変換方法。4. An FTP server and an FTP client
Data connection for transferring data between the two and the FTP
Transfer the command from the client to the FTP server
Using two paths with the control connection to be sent, add parameters to the file name on the FTP server side specified when requesting a file transfer from this FTP client,
To allow the identification of 2-byte code of the data on the data connection is the additional parameters, the FTP
A method of performing 2-byte code translation using the computer code for the server to operate analyzes the FTP protocol commands transmitted from the FTP client through the control connection, F
When the parameter is specified in the file name on the TP server side
Inspect whether or not the
The 2-byte code of the data when transferring the file from the meter
A protocol analysis process of performing identification, the data transferred via the data connection,
If the parameter is specified to determine the code conversion table according a plurality of code conversion tables in the analysis results for the protocol analysis process, the parameters
If not specified, 1 specified before file transfer
A code conversion method in an FTP server, comprising a code conversion process of determining a code conversion table from bytecode identification information and performing code conversion.
ード変換装置において実行されるコード変換のためのプ
ログラムを記録した計算機読み取り可能な記録媒体。5. A computer-readable recording medium recording a program for code conversion executed by the code conversion device in the FTP server according to claim 1.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30763298A JP3408435B2 (en) | 1998-10-28 | 1998-10-28 | Code conversion device and conversion method in FTP server and recording medium recording code conversion program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30763298A JP3408435B2 (en) | 1998-10-28 | 1998-10-28 | Code conversion device and conversion method in FTP server and recording medium recording code conversion program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000132465A JP2000132465A (en) | 2000-05-12 |
| JP3408435B2 true JP3408435B2 (en) | 2003-05-19 |
Family
ID=17971380
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30763298A Expired - Fee Related JP3408435B2 (en) | 1998-10-28 | 1998-10-28 | Code conversion device and conversion method in FTP server and recording medium recording code conversion program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3408435B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8447655B2 (en) | 2005-04-25 | 2013-05-21 | Casio Computer Co., Ltd. | Data processing apparatus |
| JP7424039B2 (en) * | 2019-12-23 | 2024-01-30 | 日本電気株式会社 | Data transmitting device, data receiving device, data transmitting and receiving system, data transmitting method, data receiving method, data transmitting program, and data receiving program |
-
1998
- 1998-10-28 JP JP30763298A patent/JP3408435B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000132465A (en) | 2000-05-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100348456B1 (en) | Method and system for transferring job between computers | |
| US6658625B1 (en) | Apparatus and method for generic data conversion | |
| EP0918282B1 (en) | Server and client | |
| US20020002451A1 (en) | Translating system and translating apparatus | |
| US20030084405A1 (en) | Contents conversion system, automatic style sheet selection method and program thereof | |
| TW201240413A (en) | Lightweight input/output protocol | |
| KR100554115B1 (en) | Computer and device driver having interface driver program for computer and recording medium therefor | |
| JPH05505266A (en) | Telecommunications interface device and method | |
| US6615231B1 (en) | System and method for directing requests to specific processing | |
| JP2000047964A (en) | Data transfer method on network, its device, its system, and recording medium having recorded data transfer program on network thereon | |
| JPH11327815A (en) | Communication control method and apparatus, and communication system | |
| US6801911B1 (en) | Data processing system and method for accessing files | |
| JP2002007182A (en) | Shared file control system for external storage device | |
| US8291089B2 (en) | Image processing device, control method therefor, and program | |
| JP3408435B2 (en) | Code conversion device and conversion method in FTP server and recording medium recording code conversion program | |
| JPH11212849A (en) | Shared file transmission / reception system, access right determination device | |
| EP0738955B1 (en) | Print request using a file transfer protocol | |
| US8112472B2 (en) | Method and apparatus for supporting multiple versions of a web services protocol | |
| KR100330011B1 (en) | How to upload files during system use of filters | |
| KR100270328B1 (en) | Method for uploading file from user terminal on the character-based web retrieval device | |
| JPH0351938A (en) | Host computer device | |
| JP2972585B2 (en) | File sharing system data transfer method | |
| JPH07319782A (en) | Character code converter | |
| JPH1031636A (en) | Electronic mail service manager having file server management function | |
| JPH04317151A (en) | File transfer device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20010327 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080314 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090314 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090314 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100314 Year of fee payment: 7 |
|
| LAPS | Cancellation because of no payment of annual fees |