Technical

Tips

I Want to Convert the Character Encoding when Transferring a File

Introduction

"I want to integrate files among systems that use different platforms!"

In that case, one issue you might face is the use of different character encodings.

HULFT can solve this problem by converting the character encoding when you transfer the file.

Specify the Character Encoding in the Transfer Destination Information

When you transfer files by using HULFT, you need to register the host name in System Configuration > Host Information.

When registering this information, specify Kanji Code Type to match the host.

On the receiving host, specify the sending host in Host Information.

The following figure shows the appropriate settings when the file on the sending host (SendHost) uses Shift-JIS encoding.

Set Up Code Conversion in Send Management Information

In System Configuration, go to Send Management Information. For Transfer Type, specify TEXT. For Code Conversion, specify either Sending Side or Receiving Side.

If you specify Sending Side, the sending host converts the character encoding before the transfer. If you specify Receiving Side, the receiving host converts the character encoding after the transfer.

By specifying these settings, a file created as a Shift-JIS file on the sending host can be received as a UTF-8 file on the receiving host.

What is No Conversion?

HULFT supports a wide variety of character encodings. However, you can of course transfer a file to another platform without converting the character encoding.

This is called No Conversion.

You may think, "Well, if I don't want to convert the character encoding when I send a file, I should set the Transfer Type to BINARY."

However, this is not the case. Even if two platforms use the same character encoding, they are different in one other respect.

That's right. Different OSs use different linefeed codes. The linefeed code, which is different from the character encoding, depends on the OS and is applied by the OS.

Because of this, if you send a file with the Transfer Type set to BINARY, the received file still has the same linefeed code that was applied by the sending host's OS.

"I don't need to change the character encoding, but I want to use the file as text on the receiving host!"

No Conversion is useful in this situation. The settings are extremely simple.

Go to System Configuration, and then to Send Management Information. For Transfer Type, specify TEXT. For Code Conversion, specify No Conversion.

For file transfers that don't require character code conversion, sending the file by using TEXT and No Conversion instead of BINARY results in a transferred file that is better suited to the receiving host's platform.

Conclusion

So, what do you think?

Although we used a conversion from Shift-JIS to UTF-8 as an example, HULFT supports character code conversion for a wide variety of platforms. If you'd like to know more, see the Code Conversion Manual.

By leaving character code conversion to HULFT, you can send files not only to systems using different platforms within your company, but also to clients or cloud systems without worrying about character encoding. Please give character code conversion a try.