bug with detect charset