Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private byte[] GetByteArray(int Code, int Len)
- {
- byte[] Ret = new byte[Len];
- byte[] conv = BitConverter.GetBytes(Code);
- for (int i = 0; i < Len; i++)
- {
- Ret[i] = conv[i];
- }
- return Ret;
- }
- ........................
- int CP = 1251;
- Encoding enc = Encoding.GetEncoding(CP);
- int maxbyte = enc.GetMaxByteCount(1);
- string[] tbl = new string[maxbyte];
- for (int i = 1; i <= maxbyte; i++)
- {
- for (Int64 j = 0; j < int.MaxValue; j++)
- {
- byte[] chrbuf = GetByteArray((int)j, i);
- tbl[i]=tbl[i]+enc.GetString(chrbuf);
- }
- }
- MessageBox.Show(char.MaxValue.ToString() + " ");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement