Path: utzoo!utgpu!water!watmath!uunet!bu-cs!bloom-beacon!tut.cis.ohio-state.edu!MITVMA.MIT.EDU!cyclops%TAMUNIX.BITNET From: cyclops%TAMUNIX.BITNET@MITVMA.MIT.EDU (Glenn Vanderburg) Newsgroups: gnu.emacs.bug Subject: nulls in strings passed to format Message-ID: <8809301814.AA13969@prep.ai.mit.edu> Date: 30 Sep 88 18:23:05 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21 I have a question about emacs lisp. The format function is not behaving the way I expect it to. The reason I'm writing is that it behaves precisely the way I *want* it to, but before I write code that depends on this unexpected behavior, I'd like to know if this is a feature or a bug. As I understand it, strings in gnu emacs can contain nulls. This fits the facts: (princ "a\000a") prints "a appears to believe otherwise: (princ (format "a%ca%c\000%ca" ?b ?b ?b)) prints "abab", and (princ (format "a%sa" "b\000b")) prints "aba". A null in any string passed as an argument to format terminates the string. Now, this is not surprising, since format is written in C. I would personally like for it to stay this way (at least for the application I'm writing now) but I'd like to know if this is considered a bug, because I don't want to write code that depends on a feature which may be "fixed" soon. Regards, Glenn Vanderburg