unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Wierd encoding error with `setenv'
@ 2003-02-25  5:40 Miles Bader
  0 siblings, 0 replies; only message in thread
From: Miles Bader @ 2003-02-25  5:40 UTC (permalink / raw)


I try to do this using today's CVS:

  M-x setenv RET lk25 RET /proj/soft2/uclinux/uclinux/linux-2.5.63-uc0 RET

and got this error:

  setenv: Can't encode `lk25=/proj/soft2/uclinux/uclinux/linux-2.5.63-uc0' with `locale-coding-system'

What's wierd is that I _don't_ get an error if I invoke the same command
via C-x ESC ESC (repeat-complex-command).

Looking at the code for `setenv,' I'm not sure what's going on; in this
snippet (which is the only place the above error occurs):

  (if (and (multibyte-string-p variable) locale-coding-system)
      (unless (memq (coding-system-base locale-coding-system)
		    (find-coding-systems-string (concat variable value)))
	(error "Can't encode `%s=%s' with `locale-coding-system'"
	       variable (or value "")))
     ...

the call to multibyte-string-p seems to be odd -- if I just evaluate
(multibyte-string-p "lk25") it returns nil, but if I get an error
backtrace so that `variable' is bound to "lk25", and evaluate
(multibyte-string-p variable), then it returns t!

Since (find-coding-systems-string (concat variable value)) always seems
to return just '(undecided), something seems dreadfully wrong.

[I'm confused about what `multibyte-string-p' actually _means_, by the
way -- shouldn't it only ever return t if the string contains non-ascii
characters?]

-Miles
-- 
97% of everything is grunge

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-25  5:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-25  5:40 Wierd encoding error with `setenv' Miles Bader

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).