ASCII,StreamWriter和瑞典字母 [英] ASCII, StreamWriter and swedish letters
问题描述
大家好!
我有一个重大问题。我需要写一个每个字母1 b的文本文件。但
它应该能够处理瑞典字母(???)。
是否可以使用8 b ASCII?
此文件由短信应用程序使用,不能采用其他格式。
/ Marre
Hi all!
I have a major problem. I need to write an textfile with 1 b per letter. But
it should be able to handle swedish letters to (???).
Is it possible to use 8 b ASCII for this?
This file is used by an sms application and cannot be in another format.
/Marre
推荐答案
MA< ne ** @ supremelink.se>写道:
MA <ne**@supremelink.se> wrote:
我有一个重大问题。我需要写一个每个字母1 b的文本文件。但它应该能够处理瑞典字母(???)。
是否可以使用8 b ASCII?
没有8位ASCII这样的东西。 (假设'你的意思是
byb)。
这个文件由短信应用程序使用,不能是另一种格式。
I have a major problem. I need to write an textfile with 1 b per letter. But
it should be able to handle swedish letters to (???).
Is it possible to use 8 b ASCII for this?
There''s no such thing as "8 bit ASCII" (assuming that''s what you meant
by "b").
This file is used by an sms application and cannot be in another
format.
您需要确切地找出*将使用的编码。
各种8位字符集与
范围0-127中的ASCII兼容,但在127以上彼此不兼容。如果
您可以找到您的应用需要输出的内容,应该是
很容易找到适合您的StreamWriter的编码。
-
Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet
如果回复小组,请不要给我发邮件
You need to find out *exactly* what encoding will be used. There are
various 8 bit character sets which are compatible with ASCII in the
range 0-127, but which are incompatible with each other above 127. If
you can find out which of those your app needs to output, it should be
easy to find the appropriate Encoding to give to your StreamWriter.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
您好Marre,
我相信瑞典语使用标准的欧洲字符集ISO-8859-1,或者您可以使用ISO-8859-15北欧集(没有?和?在8859-1,所以我会推荐后者)
System.IO.StreamWriter sw = new System.IO.StreamWriter(path);
sw.Encoding = System.Text.Encoding.GetEncoding(" ISO-8859-15");
-
快乐编码!
Morten Wennevik [C#MVP]
Hi Marre,
I believe Swedish uses the standard European characterset ISO-8859-1, or you could use ISO-8859-15 which is the nordic set (no ? and ? in 8859-1, so I would recomment the latter)
System.IO.StreamWriter sw = new System.IO.StreamWriter(path);
sw.Encoding = System.Text.Encoding.GetEncoding("ISO-8859-15");
--
Happy Coding!
Morten Wennevik [C# MVP]
你也可以使用支持瑞典语的cp1252 。
甚至更好的Unicode,它支持一切。
-
MichKa [MS]
NLS整理/区域设置/键盘开发
全球化基础设施和字体技术
Windows国际部门
此帖子提供& ;按原样
无保证,并且不授予任何权利。
" Morten Wennevik" <莫************ @ hotmail.com>在消息中写道
news:opseqzkntdklbvpo @ server72 ...
You could also use cp1252, which supports Swedish well.
Or even better Unicode, which supports everything.
--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division
This posting is provided "AS IS" with
no warranties, and confers no rights.
"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:opseqzkntdklbvpo@server72...
嗨Marre,
我相信瑞典人使用标准的欧洲字符ISO-8859- 1,或
你可以使用ISO-8859-15这是北欧集(没有?和?在8859-1,所以
我会推荐后者)
系统.IO.StreamWriter sw = new System.IO.StreamWriter(path);
sw.Encoding = System.Text.Encoding.GetEncoding(" ISO-8859-15");
-
快乐的编码!
Morten Wennevik [C#MVP]
Hi Marre,
I believe Swedish uses the standard European characterset ISO-8859-1, or you could use ISO-8859-15 which is the nordic set (no ? and ? in 8859-1, so
I would recomment the latter)
System.IO.StreamWriter sw = new System.IO.StreamWriter(path);
sw.Encoding = System.Text.Encoding.GetEncoding("ISO-8859-15");
--
Happy Coding!
Morten Wennevik [C# MVP]
这篇关于ASCII,StreamWriter和瑞典字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!