Example #1
0
        /// <exception cref="Sharpen.CharacterCodingException"></exception>
        private static string Decode(ByteBuffer b, System.Text.Encoding charset)
        {
            CharsetDecoder d = charset.NewDecoder();

            d.OnMalformedInput(CodingErrorAction.REPORT);
            d.OnUnmappableCharacter(CodingErrorAction.REPORT);
            return(d.Decode(b).ToString());
        }