Re: string substitution?



On Thu, 30 Nov 2006 20:34:48 +0100, André Thieme <address.good.until.2006.dec.22@xxxxxxxxxxx> wrote:

Pascal Bourguignon schrieb:
André Thieme <address.good.until.2006.dec.22@xxxxxxxxxxx> writes:

Pascal Bourguignon schrieb:
This is incorrect. #\Newline has no relation with CR or LF.

(cl-ppcre:regex-replace-all
(string #\Linefeed)
target-string
(concatenate 'string (string #\Return) (string #\Linefeed)))


At least on sbcl there seems to be a relation:
Implementation specific.

Okay, possible.
But I can say that at least sbcl works this way.
And clisp. Not to forget Allegro. Oh, and cmucl.
But maybe all the other lisps act different in that regard, so probably
you are right, and there mostly is no relation between #\Linefeed and a
#\Newline. ;)


André

All running Unix right?
That is because #\Linefeed is a gives a newline under Unix.
However under Windows it just goes to the next line.
A #\Return is needed to send it to the beginning of line.
(Like on a typewriter)
I come across this a lot having to convert #\Newline to
#\Return #\Newline. By the way a Mac used (does it still use?)
just #\Return. This is probably the reason for the routine.
I should have caught the problem myself. For Unix compatabillity
Emacs typically handles both cases for Windows and Unix.
So LispWorks for Windows handles #\Linefeed as #\Newline.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
.



Relevant Pages

  • Re: What is the more popular UNIX flavor?
    ... about my experience with Solaris and Cygwin. ... installing packages. ... needing eg tftp you only need to activate on a Unix system. ... probably need installing first on the equivalent Windows system. ...
    (comp.unix.questions)
  • Re: Five Architectural Flaws in Windows Solved In Mac OS X
    ... But it is still an improvement over Unix, wherein *any executable* can be highly privileged and interact with the user. ... The usual security precautions prevent unauthorized people from doing this, but that's true on Windows also. ... I just got thru upgrading the wifes Mac to Tiger and hpfs is the default. ... This is a more advanced design that Unixes have been trying to duplicate by adding thread support. ...
    (comp.sys.mac.advocacy)
  • Re: Linux no threat to Microsoft
    ... originally developed for Unix. ... Windows has't come on any of the machines I've ever purchased. ... Yet over those years Linux Market Share on the desktop has actually ... philosophy of Apple - later adopted by Microsoft. ...
    (comp.os.linux.setup)
  • Re: OS X "Security" myths
    ... >> lot of UNIX systems down to their knees. ... >>> their code, so they concentrate on developing exploits for Windows, ... > It does tell me that there is not much "boast factor" for malware ... Just like the Hackers convention in Las Vegas known as ...
    (comp.sys.mac.advocacy)
  • Re: Wozu Linux privat einsetzen?
    ... > Open Source bzw. GNU sind nicht an eine bestimmte Plattform gebunden. ... Windows ist nun mal nicht OpenSource. ... > Unix ist genauso gewachsen wie DOS, OS/2, Windows. ...
    (de.comp.os.unix.linux.misc)