wanted: --external-format command-line argument

Bug #659107 reported by Nikodemus Siivola on 2010-10-12
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Medium
Unassigned

Bug Description

...for specifying the default independent of locale.

While LC_ALL=<whatever> works, specifying a bogus external format that way doesn't cause a warning.

--external-format=bad-format should cause SBCL to signal a warning during initialization.

James Y Knight (foom) wrote :

It seems funny to request a command-line argument for the sole purpose of emitting a warning.

Attila Lendvai (attila-lendvai) wrote :

if there was a --external-format then it would have spared me quite some time when i was setting up our rc.d scripts...

the value of $LANG in rc.d scripts was not obvious. startup script worked when run manually, but fail in remote ways when the server booted (and SBCL used ascii).

i would have just added --external-format to the command line and be done with it. instead of this i had to learn unix voodoo like "sudo localedef -f UTF-8 -i en_US en_US.UTF-8" or "sudo dpkg-reconfigure locales" for an update-safe solution (which i'm not too keen on poisoning my brain with).

James Y Knight (foom) wrote :

I don't see any reason that SBCL should be an exceptional case: the rest of the system needs the system locale configuration to be setup properly, why does SBCL need to do something different -- why does it deserve a command-line option?

Some things that make more sense than that:
- Making *default-external-format* public.
- Making it possible to specify, in a source file, what encoding that source file should be read with. E.g.
http://www.python.org/dev/peps/pep-0263/

Attila Lendvai (attila-lendvai) wrote :

there's a very important thing to consider: sbcl could work fine without the host system being configured properly.

IOW, there's an unnecessary coupling between the posix locale environment variable and locale compilation voodoo, and sbcl's external format machinery. they are pretty much independent except the initialization phase, so why couple them? or at least why not provide a method of configuring them independently, even if sbcl's default comes from the posix stuff...

tags: added: easy
Nikodemus Siivola (nikodemus) wrote :

I want to be able to write a program that starts SBCL with the desired default external format without needing to know which locales are available.

That said, these would also be very welcome:

 * Bug 727621.

 * Bug 727622.

 * Bug 727623.

 * Bug 727625.

Changed in sbcl:
importance: Wishlist → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers