ISO拉丁语编码 [英] ISO-Latin Encoding

查看:93
本文介绍了ISO拉丁语编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个for循环,将所有ISO-Latin字符

打印到数据库。但是:我不确定如何打印

ISO-Latin字符集。有人能给我一些指示吗?我认为我必须使用编码eISOLatin = Encoding.GetEncoding(28591);但是

之后:我有点迷失了。


谢谢

Andy

解决方案

Andy< An ** @ discussion.microsoft.com>写道:

我正在尝试编写一个for循环,将所有ISO-Latin字符打印到数据库中。但是:我不确定如何打印
ISO-Latin字符集。有人能给我一些指示吗?我想我必须使用编码eISOLatin = Encoding.GetEncoding(28591);但在此之后:我有点失落。




如果您通过打印确切地说出您的意思,那将会有所帮助。到一个

数据库。


我怀疑你根本不需要编码 - 如果你的数据库

了解适当的Unicode,您应该只能将字符串中的所有字符写入字符串。确切的范围

ISO-Latin-1有点有趣 - Unicode标准暗示

它的Unicode值为0-255,但我相信它'' s *实际上* 32-127和

160-255。


-

Jon Skeet - < sk ** *@pobox.com>
http://www.pobox.com/~双向飞碟

如果回复小组,请不要给我发邮件


Jon:


我的任务是编写一个小应用程序将所有ISO-Latin

字符打印到AS / 400表中,这样我们就可以确定哪个来了

通过正确以及我们可以从.Net到

AS / 400支持哪些。我被告知我们不想要ANSCII字符,因为它们会被截断。


我对如何准确打印ISO-感到很遗憾拉丁值,以便在我们AS / 400上的表中插入

时,我们可以确定哪些是可支持的。


我希望这有助于进一步解释这个问题。


谢谢

Andy


" Jon Skeet [C#MVP]"写道:

Andy< An ** @ discussion.microsoft.com>写道:

我正在尝试编写一个for循环,将所有ISO-Latin字符打印到数据库中。但是:我不确定如何打印
ISO-Latin字符集。有人能给我一些指示吗?我想我必须使用编码eISOLatin = Encoding.GetEncoding(28591);但在此之后:我有点失落。



如果您通过打印确切地说出您的意思,那将会有所帮助。到一个
数据库。

我怀疑你根本不需要编码 - 如果你的数据库正确理解Unicode,你应该只能写所有
将数据库中的字符作为字符串。 ISO-Latin-1的确切范围有点令人感兴趣 - Unicode标准意味着它的Unicode值为0-255,但我相信它实际上是* 32-127
160-255。

- Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet
如果回复小组,请不要给我发邮件太



Andy< An ** @ discuss.microsoft.com>写道:

我的任务是编写一个小应用程序将所有ISO-Latin
字符打印到AS / 400表中,以便我们能够确定哪个来了
通过正确以及我们可以从.Net到
AS / 400支持哪些。我被告知我们不想要ANSCII字符,因为它们会被截断。


ANSCII是什么意思?你的意思是ASCII,还是ANSI?

我对如何精确打印ISO-Latin值感到迷茫,以便在我们的AS / 400上插入表格时,我们可以确定哪一个是支持的。




我仍​​然不知道你所说的打印是什么意思一个角色进入一个

表。你只是想将一个字符串值插入表中吗?如果是这样,

只需创建一个参数化的SQL语句,将参数

插入表中,并在
$ b $中每个字符重复调用一次b范围为32-127和160-255。 (或者,用一个字符串调用它一次

包含所有这些字符 - 我认为前者会更容易

来计算出什么是不行的,特别是如果你包含一个

的第二个参数是一个整数,那么你的Unicode值就是
插入。)


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet

如果回复群组,请不要给我发邮件


I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEncoding(28591); but
after this: I am a bit lost.

Thanks
Andy

解决方案

Andy <An**@discussions.microsoft.com> wrote:

I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEncoding(28591); but
after this: I am a bit lost.



It would help if you''d say exactly what you mean by "printing" to a
database.

I suspect you don''t need an encoding at all though - if your database
understands Unicode appropriately, you should just be able to write all
the characters to the database as strings. The exact range of
ISO-Latin-1 is somewhat interesting - the Unicode standard implies that
it''s Unicode values 0-255, but I believe it''s *actually* 32-127 and
160-255.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Jon:

I have been tasked with writing a small app to print all ISO-Latin
characters into an AS/400 table, so that we are able to assertain which come
through correctly and which ones we can support from .Net through to the
AS/400. I was told that we did''nt want ANSCII characters, as they would be
truncated.

I am lost on how to exactly print the ISO-Latin values so that when inserted
into a table on our AS/400, we can determine which are supportable.

I hope this helps further explain the issue.

Thanks
Andy

"Jon Skeet [C# MVP]" wrote:

Andy <An**@discussions.microsoft.com> wrote:

I am trying to write a for loop that will print all the ISO-Latin characters
to a database. However: I am not sure exactly how to go about printing the
ISO-Latin character set. Would anyone be able to give me some pointers? I
think I have to use Encoding eISOLatin = Encoding.GetEncoding(28591); but
after this: I am a bit lost.



It would help if you''d say exactly what you mean by "printing" to a
database.

I suspect you don''t need an encoding at all though - if your database
understands Unicode appropriately, you should just be able to write all
the characters to the database as strings. The exact range of
ISO-Latin-1 is somewhat interesting - the Unicode standard implies that
it''s Unicode values 0-255, but I believe it''s *actually* 32-127 and
160-255.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too



Andy <An**@discussions.microsoft.com> wrote:

I have been tasked with writing a small app to print all ISO-Latin
characters into an AS/400 table, so that we are able to assertain which come
through correctly and which ones we can support from .Net through to the
AS/400. I was told that we did''nt want ANSCII characters, as they would be
truncated.
What do you mean by "ANSCII"? Do you mean ASCII, or ANSI?
I am lost on how to exactly print the ISO-Latin values so that when inserted
into a table on our AS/400, we can determine which are supportable.



I still don''t know what you mean by "printing" a character into a
table. Do you just mean inserting a string value into a table? If so,
just create a parameterised SQL statement which inserts the parameter
into the table, and call it repeatedly, once per character in the
ranges 32-127 and 160-255. (Alternatively, call it once with a string
with all those characters in - I think the former would make it easier
to work out what doesn''t work though, especially if you include a
second parameter which is an integer, the Unicode value you''re
inserting.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


这篇关于ISO拉丁语编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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