Calling methods which are not properties through use of dot notation is a
no-no in Apple's Objective-C 2.0 documentation. According to Apple it might
work but the compiler will not warn about any dangerous use cases.
The prominent example from the docs of how not to do it is "someObject.retain".
Here retain is a method and not a property so proper use is "[someObject retain]".
Unfortunately, often it is not clear if something in the API is merely an accessor
or a method which acts like an accessor but does more than the name might imply.
In this case, we can see this in PBEasyPipe where we have method calls like
"NSTask.standardOutput = ...". Even though they may look correct this can be
dangerous for obvious reasons. I assume hat this could also play a role in the appearance
of the "bad file descriptor" messages.
We used to fall back on the ASCII encoding if UTF-8 did not work out. However,
this causes its own problems; ASCII is only valid for the lower 7 bytes. We
solve this by using Latin-1, which should have a valid character for every
byte sequence
If a commit had invalid UTF-8 characters in them -- like one in git.git for
example -- then the revparsing would stop halfway through. This patch first
tries UTF-8 enconding, and if that fails, falls back to ASCII encoding.