I finally found the insight.
The result of my studies is that if a file contains bytes with values >127 pspad
refuses to consider it encoded in utf-8.
It may be reasonable (I didn't check utf-8 specs) but this means that Utf-8
files, according to pspad, CAN be malformed.

No BOMs involved.

What I did to check ouput encoding from my software (php) was to send to the
file an extended ascii string (

Odpovedet emailem