I've been trying to format some text using java on a windows virtual machine. Text from the file looks like:
Local
RPLSTRGKD2
Rcpt/Disb
I'm trying to replace this text block with just
Local Rcpt/Disb
When searching for this block of text in the document originally started with just \n for newline however I switched to using \r\n when I found out that is a how it should be on windows.
On further debugging through eclipse I found that the text was actually:
Local\r\r RPLSTRGKD2\r\r Rcpt/Disb
This code will be deployed to Unix server so I think I may need to change the \r to \n before deploying the code.
I have 2 questions:
Is there any explanatation for why \r is being used instead of \r\n which is expected on windows.
Is there any way to deploy this to a Unix server where \n is supposed to be used instead of \r without having to change the code for deployment?