Beispiel #1
0
        protected internal static string GetString(byte[] data, CodepageRecord codepage)
        {
            int cp = CodePageUtil.CP_ISO_8859_1;

            if (codepage != null)
            {
                cp = codepage.Codepage & 0xffff;
            }
            try
            {
                return(CodePageUtil.GetStringFromCodePage(data, cp));
            }
            catch (EncoderFallbackException uee)
            {
                throw new ArgumentException("Unsupported codepage requested", uee);
            }
        }
Beispiel #2
0
 public void SetCodePage(CodepageRecord codepage)
 {
     this.codepage = codepage;
 }