extension to the previous fix: reset errno every time mbtowc() fails.
extension to the previous fix: reset errno every time mbtowc() fails.
FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs,FranklinChen/Hugs