I very highly doubt that the mapping table is wrong. It's been used successfully without any issues for several years.
I'm not blaming the mapping table.. don't know in detail what goes wrong and why, however this statement of yours:
Of course uploading in Binary messes all that up.
Is the exact opposite of my observations.. whenever something got craped, a check if transfer mode was set to binary
revealed i forgot to set it.. and probs disappeared right after setting it and re-uploading via binary.
In terms of what do my files (mostly php) look like encoding/lineending wise:
My standard setup - for years now - is ut8 with unix LF.. the editor is setup to enforce this and change it if needed.
The framework/CMS i'm mostly using has also been combed to this specs.. the only exceptions that might occur are
3rd party extension. Also i'm usually not in a mixed/co-working setup..
But this seems almost beside the point since - as mentioned above - a switch to binary consistently fixes the newline probs..
not only for me, but also for fellow coders.. like the one whose "doubled newlines" problem today could be fixed by switching
to binary.. (and actually made me post this request.. since he's not yet familiar with YF and was looking for the transfer settings
in the app's prefs..)
I'm fully aware i might be jumping to false conclusions, however the "switch to binary, and it'll be ok.." works so consistently,
that i just can't wrap my head around what is going on.. the more since your comment would indicate the exact opposite..
regards..