SBCS and DBCS support; detailed error messages; bug fixes