Hi,
it would be great if VirtualMin supports character encodings for MySQL databases. As i noticed, PostgreSQL webmin already supports them so i think it should not be a big task.
I already created a code for my webmin version, but it lacks many checks and lacks many features.
I think that a proof of concept should be:
Virtualmin -> domain -> Edit databases button -> Create new database
There is a form for Name and Type of database, we should add a select "Database encoding".
Then a database should be created with selected encoding, or created as usual and SQL query should be executed after creating database in feature-mysql.pl::create_mysql_database
&mysql::execute_sql_logged($mysql::master_db, "alter database ".&mysql::quotestr($_[1]).' character set '.&mysql::quotestr($ENCODING));
My code does this, but:
- i manually hardcoded three encodings to the form (utf8, latin2, cp1250) - we should fetch allowed encodings from mysql database - these are compiled in
- i altered feature-mysql, but i am not sure, if it's compatible with all webmin versions and installations. i noticed there are more places to create database (plugins?)
Should i post the code?