Develop multi ling 03 14 2019 mb4#932
Conversation
… and mess up the database. Note: We do not need decode from thaw because as sequences of bytes nothing changes. (I think.)
…ch/webwork2 into locbug Conflicts: courses.dist/modelCourse/course.conf
… suggested by goehle
added [qw(Encode::Encoding)] to ${pg}{modules}) in defaults.config as…
…lop_uft8_ver2 # Conflicts: # lib/WeBWorK/ContentGenerator/Instructor/SendMail.pm # lib/WeBWorK/Utils.pm
Implement suggestions from Nathan Wallach
OPL-update-latin1 and OPL-update-utfmb4 are no longer needed -- OPL-update performs both functions with a switch for choosing the character set to be used. The same for update-OPL-update-*
…ocker-entrypoint.sh if it does not exist a
…e it is used in the database handling code
… a text file) Corrected a typo in the Save function regarding encoding
The call for create table starts in DB.pm, calls Schema::NewSQL::Std.pm in which new calls Schema::NewSQL.pm as parent which then passes the new call on to Schema.pm where actual work gets done. The NewSQL.pm file is essentially a passthrough layer and should be refactored.
|
I've found that encoding things in base64 and then decoding them causes a known problem. I'll post more in issue #933. It causes things like knowls to fail (which means that Solutions also fails). Most likely requires changes in both perl encode/decode and javascript encode/decode |
|
In docker these commits make such things as using wide characters for user names behave correctly, even with the original utf8 database (not the one set to utf8mb4). Pulling this PR to demo.webwork.rochester.edu does not fix the problem of entering user names with wide characters :-(. even though the tables are correctly created to allow this (for the chinese2 course at least) -- Not sure what to check next -- there is probably some difference in the database configuration. |
|
on the docker version of the mysql database I see on the demo .webwork version I get mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%'; This would account for the different behavior. Tani has suggested that I could override |
This is pretty similar to #930 but assuming multibyte capabilities of mysql.
There is a switch in site.conf.dist which turns this capability on (also an entry in localOverrides.conf).
If the switch is turned off this is compatible with older versions of mysql (before 5.3). If the switch is turned on it will build OPL databases that allow all characters. It will allow all characters in new courses that are created after the switch is turned on. It will not change courses build earlier.
As far as I can tell the earlier courses will run exactly the same as before the switch to utf8mb4. If one finds mangling of some characters with accents (mojibake)
then report this on issues.