[Openmcl-devel] *default-external-format* and encoding and decoding strings.
ron at flownet.com
Mon Mar 7 23:09:45 UTC 2016
On Mar 7, 2016, at 2:37 PM, Dmitry Igrishin <dfigrish at gmail.com> wrote:
>> > (in-package :ccl)
>> > (let ((ccl::*warn-if-redefine-kernel* nil))
>> > (defun lookup-character-encoding (name)
>> > (gethash (or name *default-external-format*) *character-encodings*)))
>> I don't think I can apply this.
>> The issue is that nil is a valid character encoding name: it's a documented synonym for :iso-8859-1.
> Just curious, why is so? Doesn't the "nil" means "unknown" or "false"? And if something that means
> the "default" is "unknown" or "false" should by treated as exceptional situation?
It’s to maintain backwards-compatibility with CCL before *default-external-format* was introduced, when :ISO-8859-1 was hard-coded as the default. There was a big discussion over whether or not to change this, and *default-external-format* was introduced as a backwards-compatible compromise.
More information about the Openmcl-devel