Just helped someone with an issue they were running into because their stream had byte order marks, which the encoding regex was choking on. The regex for the <?xml... tag uses /^</, but with the byte order marks, that fails to match.
More info here:
And if you want an example, the issue came up here:
thanks again for your help on this :)