Fixed port-position to consider peeked char byte count.
(Not a good solution but better than doing incorrectly.)
Added test case for transcoded port position.