Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
 public void SetCodePage(CodepageRecord codepage)
 {
     this.codepage = codepage;
 }
Exemplo n.º 3
0
        /**
         * Creates the Codepage record containing the constant stored in CODEPAGE
         * @see org.apache.poi.hssf.record.CodepageRecord
         * @see org.apache.poi.hssf.record.Record
         * @return record containing a CodepageRecord
         */

        private static Record CreateCodepage()
        {
            CodepageRecord retval = new CodepageRecord();

            retval.Codepage=(CODEPAGE);
            return retval;
        }
Exemplo n.º 4
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);
     }
 }
Exemplo n.º 5
0
 public void SetCodePage(CodepageRecord codepage)
 {
     this.codepage = codepage;
 }
Exemplo n.º 6
0
        /**
         * Creates the Codepage record containing the constant stored in CODEPAGE
         * @see org.apache.poi.hssf.record.CodepageRecord
         * @see org.apache.poi.hssf.record.Record
         * @return record containing a CodepageRecord
         */

        protected Record CreateCodepage()
        {
            CodepageRecord retval = new CodepageRecord();

            retval.Codepage=(CODEPAGE);
            return retval;
        }