EUC-JP

エンコーディングに不具合がありそ。

using System;
using System.IO;
using System.Text;
using System.Net;

class X {
  static void Main () {
    byte [] buf = {131, 69};
    Encoding enc = Encoding.GetEncoding ("euc-jp");
    string s = enc.GetString (buf, 0, buf.Length);
  }
}

こいつをコンパイルして実行すると、

Unhandled Exception: System.Resources.MissingManifestResourceException: Could not find any resource appropiate for the specified culture or its parents. Make sure "I18N.resources" was correctly embedded or linked into assembly "I18N".
in <0x002a8> System.Resources.ResourceManager: InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean Createifnotexists, Boolean tryParents)
in <0x003b8> System.Resources.ResourceManager: InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean Createifnotexists, Boolean tryParents)
in <0x003b8> System.Resources.ResourceManager: InternalGetResourceSet (System.Globalization.CultureInfo culture, Boolean Createifnotexists, Boolean tryParents)
in <0x00043> System.Resources.ResourceManager: GetString (System.String name, System.Globalization.CultureInfo culture)
in <0x00064> I18N.Common.Strings:GetString (System.String tag)
in <0x003cd> I18N.CJK.CP51932:GetChars (System.Byte bytes, Int32 byteIndex, Int32 byteCount, System.Char chars, Int32 charIndex)
in <0x00049> System.Text.Encoding:GetChars (System.Byte bytes, Int32 index, Int32 count)
in <0x00016> System.Text.Encoding
:GetString (System.Byte bytes, Int32 index, Int32 count)
in <0x00075> X:Main ()

こんなエラーが発生します。http://www.google.co.jpの586-587バイトで遭遇。(^^;