在EBCDIC中写一个字符串 [英] Write a string in EBCDIC

查看:75
本文介绍了在EBCDIC中写一个字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在EBCDIC中的文件中写一个字符串。


我是否需要使用翻译表逐个字符地进行,

或是否有一个翻译整个字符串的函数?


(我知道我可以使用Unix实用程序转换整个文件,但

这个文件会有EBCDIC中只有几个标题记录)

I need to write a string to a file in EBCDIC.

Do I need to do it character by character using a translation table,
or is there a function to translate the whole string?

(I am aware that I can convert a whole file using Unix utilities, but
this file will have only a few header records in EBCDIC)

推荐答案

jo ******** @ madasafish.com (John Leslie)写道:

#我需要在EBCDIC的文件中写一个字符串。



#我是否需要逐个字符地使用翻译表,

#或是否有翻译整个字符串的功能?



#(我知道我可以使用Unix实用程序转换整个文件,但是

#这个文件只有几个头记录EBCDIC)
http://www.room42.com/store/computer...ranslate.shtml


-

SM Ryan http://www.rawbw.com/~wyrmwif/

别说什么。特别是你。
jo********@madasafish.com (John Leslie) wrote:
# I need to write a string to a file in EBCDIC.
#
# Do I need to do it character by character using a translation table,
# or is there a function to translate the whole string?
#
# (I am aware that I can convert a whole file using Unix utilities, but
# this file will have only a few header records in EBCDIC)

http://www.room42.com/store/computer...ranslate.shtml

--
SM Ryan http://www.rawbw.com/~wyrmwif/
Don''t say anything. Especially you.


John Leslie写道:
John Leslie wrote:

我需要在EBCDIC的文件中写一个字符串。

我是否需要逐字逐句地使用翻译表,或者是否有翻译整个字符串的功能?

I need to write a string to a file in EBCDIC.

Do I need to do it character by character using a translation
table, or is there a function to translate the whole string?




如果系统本机字符集是EBCDIC,只需编写字符串。

整个问题是系统特定的,而不是特定于语言的,并且

因此在clc中是偏离主题的它需要知道来源

和目标字符集及其编码。我会创建一个

翻译函数,并为每个特定系统自定义它。


尝试一个处理特定系统的组。


-

Chuck F(cb********@yahoo.com)(cb********@worldnet.att.net) )

适用于咨询/临时嵌入式和系统。

< http://cbfalconer.home.att.net>使用worldnet地址!



If the system native char set is EBCDIC, just write the string.
The whole problem is system specific, not language specific, and
thus is off-topic in c.l.c. It requires knowing both the source
and destination char sets and their coding. I would create a
translation function, and customize it for each specific system.

Try a group that deals with your specific system.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


-----开始PGP签名消息-----

哈希:SHA1


SM Ryan写道:

| jo********@madasafish.com (John Leslie)写道:

| #我需要在EBCDIC的文件中写一个字符串。

| #

| #我是否需要使用翻译表逐个字符地进行,

| #或者是否有翻译整个字符串的功能?

| #

| #(我知道我可以使用Unix实用程序转换整个文件,但是

|#这个文件在EBCDIC中只有几个标题记录)

|

| http://www.room42.com/store/computer ... ranslate.shtml


我会谨慎使用这个例子。首先,它并没有表明

/它/ EBCDIC正在将ASCII转换为,而另一方面,它表现为

至少256个不正确的ASCII到 - EBCDIC转换,如果不是更多。


对于它的价值,大约有30种不同的EBCDIC变体,每种变体在订单中都有

的差异,公共字符的代码点,以及

分配给不同字符的代码点。你可能想看一下

看看 http://anubis.dkuug.dk/i18n/charmaps/


- -

Lew Pitcher


Master Code Code& JOAT-in-training |可根据要求提供GPG公钥

注册Linux用户#112576( http:/ /counter.li.org/

Slackware - 因为我知道我在做什么。

----- BEGIN PGP SIGNATURE-- ---

版本:GnuPG v1.2.4(GNU / Linux)

评论:使用GnuPG和Thunderbird - http://enigmail.mozdev.org

iD8DBQFAy8VLagVFX4UWr64RAhUTAJwKsjG10yqHt3ekExcB3M h8e0TdWgCgsxnz

c4MlgfDNzFr6oh / JVg3ju9I =

= + wfr

----- END PGP SIGNATURE -----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

SM Ryan wrote:
| jo********@madasafish.com (John Leslie) wrote:
| # I need to write a string to a file in EBCDIC.
| #
| # Do I need to do it character by character using a translation table,
| # or is there a function to translate the whole string?
| #
| # (I am aware that I can convert a whole file using Unix utilities, but
| # this file will have only a few header records in EBCDIC)
|
| http://www.room42.com/store/computer...ranslate.shtml

I''d be cautious in using that example. For one thing, it doesn''t indicate
/which/ EBCDIC it is translating ASCII to, and for another, it performs at
least 256 improper ASCII-to-EBCDIC conversions, if not more.

For what it''s worth, there are about 30 different EBCDIC variants, each with
differences in the order and codepoint of common characters, and the
assignment of codepoints to disparate characters. You might want to take a
look at the various characterset mappings at http://anubis.dkuug.dk/i18n/charmaps/


- --
Lew Pitcher

Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I''m doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAy8VLagVFX4UWr64RAhUTAJwKsjG10yqHt3ekExcB3M h8e0TdWgCgsxnz
c4MlgfDNzFr6oh/JVg3ju9I=
=+wfr
-----END PGP SIGNATURE-----


这篇关于在EBCDIC中写一个字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆