[Mono-list] mcs use codepage and program with chinese

ÿffffb8ÿffffb8 ÿffffbfÿffffe4 kuafftek@yahoo.com.cn
Tue, 10 Aug 2004 12:09:16 +0800 (CST)


--0-100382177-1092110956=:10143
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit


If you are a East-Aisa prople,maybe you will find them.Now let's test and write a program with East-Aisa language.¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ªusing System;namespace Test{   public class Hello   {     public static void Main()     {         Console.WriteLine("ÄãºÃ");     }   }  }______________It is a simple problem Like "Hello world", but use chinese.In Windows(Language Chinese,codepage:936, GB2312),run"mcs -codepage:936 Hello.cs",then get Hello.exe.When We run the Hello.exe,In Console It don't show "ÄãºÃ",butsome strange characters.In linux as same.Now we test the program in another mode.We use the tool "native2ascii" of JDK and run "native2ascii Hello.cshello1.cs",then we get Hello1.cs in ascii coding.run "mcs -codepage:utf8 Hello1.cs" ,then get Hello1.ex.Run hello1.exe,In windows we get right output "ÄãºÃ";but in Linux it output some strange characters.Strange?




---------------------------------
Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
--0-100382177-1092110956=:10143
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit

<PRE>If you are a East-Aisa prople,maybe you will find them.

Now let's test and write a program with East-Aisa language.
¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª
using System;
namespace Test
{
   public class Hello
   {
     public static void Main()
     {
         Console.WriteLine("ÄãºÃ");
     }
   }  
}

______________
It is a simple problem Like "Hello world", but use chinese.

In Windows(Language Chinese,codepage:936, GB2312),run
"mcs -codepage:936 Hello.cs",then get Hello.exe.

When We run the Hello.exe,In Console It don't show "ÄãºÃ",but
some strange characters.

In linux as same.

Now we test the program in another mode.

We use the tool "native2ascii" of JDK and run "native2ascii Hello.cs
hello1.cs",then we get Hello1.cs in ascii coding.

run "mcs -codepage:utf8 Hello1.cs" ,then get Hello1.ex.Run hello1.exe,
In windows we get right output "ÄãºÃ";

but in Linux it output some strange characters.


Strange?
</PRE>
<DIV></DIV><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://music.yisou.com" target=blank>150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ</a><br><a href="http://image.yisou.com" target=blank>ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ</a><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/" target=blank>1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡</a>
--0-100382177-1092110956=:10143--