From fau at riseup.net Mon Aug 19 08:17:17 2013 From: fau at riseup.net (Frank) Date: Mon, 19 Aug 2013 02:17:17 -0600 Subject: Introspection Message-ID: <1376900237.799.7.camel@elitebook> Hello, I would like to determine the (max) number of bytes a character/units in a certain encoding consumes. Unfortunately there does not seem to be an interface exposed for it (or I just don't see it). I'm doing it this way: (defun max-code-units (encoding) (babel::enc-max-units-per-char (babel::get-character-encoding encoding))) (defun code-unit-size (encoding) (ash (babel::enc-code-unit-size (babel::get-character-encoding encoding)) -3)) (defun max-code-size (encoding) (let ((e (babel::get-character-encoding encoding))) (* (babel::enc-max-units-per-char e) (ash (babel::enc-code-unit-size e) -3)))) Is this a good idea to to that way? Please comment. Thanks, Frank From fau at riseup.net Fri Aug 30 08:53:29 2013 From: fau at riseup.net (Frank) Date: Fri, 30 Aug 2013 02:53:29 -0600 Subject: unsubscribe Message-ID: <1377852809.1469.0.camel@elitebook> unsubscribe From luismbo at gmail.com Mon Aug 19 10:07:15 2013 From: luismbo at gmail.com (=?utf-8?Q?Lu=C3=ADs?= Oliveira) Date: Mon, 19 Aug 2013 11:07:15 +0100 Subject: Introspection References: <1376900237.799.7.camel@elitebook> Message-ID: Hello, Frank writes: > I would like to determine the (max) number of bytes a character/units in > a certain encoding consumes. Unfortunately there does not seem to be an > interface exposed for it (or I just don't see it). I believe that interface is exposed in the BABEL-ENCODINGS package. Lu?s