update from current master (8d14bff); fixes ill-formed utf-8a handling