As luck would have it...
Our Smart Differencer tools handle a huge variety of input encodings. You can define the input encoding as an environment variable, so if you do a lot of compares you might want to write a little script. (We're moving towards allowing this as a command line switch).
These tools are designed to compare computer langauges, and are langauge specific.
There's a version specifically to compare PHP programs.
If all you want is a plain vanilla text diff, this won't be your tool.
[This makes me consider the "trivial computer language" consisting of text lines,
which this tool would do really well. I'll have go build one of these
(really easy with our machinery) just to see what it is like. Stay tuned
to this Bat channel.]