"read" command ignoring leading spaces

I have to read a file line by line, change it and then update the file. Problem is, when i read the file, "read" command ignores leading spaces.
The file is a script which is indented in many places for clarity. How to i make "read" command read leading spaces as well.

Tbh, I have no idea how to preserve leading spaces when reading a file with "read". Maybe awk or sed can do the job too; can you post a glimpse of the input and desired output? Please use [ code ] and [ /code ] tags if you do so to preserve special characters, etc. and for readability, ty.

You should modify the current IFS in order to achieve that.
Something like:

while IFS= read -r ...

Notice that some read implementations do not support the -r option.

Just would like to post a 'thank you' to radulov: After more than 1 year I found this thread and it exactly ansvering the question.
The option EFS= is works perfect (at least in my system) (the -r is not nessesary here)