How do MariaDB and MySQL differ in character set handling?
MySQL and MariaDB handle character sets the same.  However...  Different versions of MySQL have different defaults.  Ditto for MariaDB.

SET NAMES declares what encoding is in the client.  This is independent of the CHARACTER SET on a column or table.  (There are, of course, characters that are not representable in latin1, so there can be conversion problems.)  As you say, the conversion occurs on INSERT or SELECT.

To further pursue this, please tell us what client you are using, what connection parameters were used, any SETs performed, and what happened.

For diagnosing what is stored, use SELECT col, HEX(col)....  More details.