Skip to Main Content
  • Questions
  • Set line delimiter in Textarea page item (CRLF vs LF)

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Andreas.

Asked: April 21, 2021 - 7:07 am UTC

Last updated: April 27, 2021 - 7:08 am UTC

Version: 20.2

Viewed 1000+ times

You Asked

Hi, in an app I'm developing in APEX I've seen, that lines entered in a text area page item are terminated with the windows style CRLF chars. It causes problems in an application which processes this data on UNIX systems. Sure we could transform this chars from CRLF to LF on the client, but would it be possible to define the way the text gets created/stored in the application directly? Is there any parameter or so to tell the page item how to set the line delimiter?

and Connor said...

Not to my knowledge, and I think it would create more problems than solutions

eg

- Someone cut/pastes text with CRLF into your text field
- You save it after stripping it down to LF
- When it comes back to to the client and they copy/paste it into (say) Notepad, they'll get garbage and they'll be on the phone to you :-)

If a consuming application needs to get modified data, better for it to do so on query (perhaps via view). If it needs to do that a *lot*, then perhaps save the stripped data on entry but still keep the original for the client if needed.



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

APEX

Keep your APEX skills fresh by attending their regular Office Hours sessions.