Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with carriage return in varchars
"wayne" <no_at_email.please.com> wrote in message
news:9ehkht$8ob_at_dispatch.concentric.net...
> > Could someone please provide some advise on how to store a carriage-return
> > (like \n in C++) in a VARCHAR2 field?
>
> I have loked into this in the past... My solution was to create the DB with
> the Windows character set (ISO2259P1, or something like that... Actually,
> please go look it up in the docs, I am positive this is wrong!).
>
> With the windows character set I could store from character 0 to 255, I was
> surprised I could store character 0... Anyway, since a CRLF is chaar(10) +
> char(13) you should have no problem if you use the windows character set.
>
> In the other character sets you may have your characters translated, so if
> you try to store a char(10) it may get translated to something else (like
> "?").
The above is mostly correct, although it's not "char" but rather "chr". e.g.: chr(10), not char(10).
-Matt Received on Wed May 23 2001 - 20:40:55 CDT