fix or charset logic