connection: Re-split the lookup of Charset for 7.8 and 8.x