I am really sorry, looking at the source code I found that I had misunderstood the settings.
I was inside a project and I didn't know that the "Strip trailing spaces and tabs" option for projects must be set in Project -> Properties. I thought the the Edit -> Preferences -> Files settings was global and always valid, but the Project -> Properties settings overwrites the others.
So, no bugs at all. I hope this can help someone else.