generic solution for windows line endings