OPL Maintenance

My pg file are read as iso8859

My pg file are read as iso8859

by Michele Nasoni -
Number of replies: 4

Hi

I imported the french pg files encoded in utf8 however the webwork read them in iso88591

Can I modify webwork to read the files in utf8?

In reply to Michele Nasoni

Re: My pg file are read as iso8859

by Michael Gage -

Probably yes, if you have access to the command line and the mysql database.  (Back things up first!) and then change the character set being used in the tables.


If you are using webwork 2.15 or later (perhaps 2.14 as well) then you should have modified the database at that time to be utf8mb4 (mysql's version of full unicode, 4 byte character encoding ) compatible. The documentation on webwork site about this is still rather spotty, but there is lots of information within mysql documentation.  We're still catching up on the uniform internationalization of webwork -- its a new feature and I hope that it takes off.





In reply to Michael Gage

Re: My pg file are read as iso8859

by Nathan Wallach -
I do not think that an non-UTF-8 database setting should directly interfere with WW 2.15 loading and displaying PG files coded in UTF-8.

If the database (for WW 2.15, or an early version patched with UTF-8 support) was not using the utf8mb4 character set (or less safely the incomplete 3-btye mySQL utf8 character set) that would likely only cause problems with saving data which requires "multi-byte UTF-8 characters" to be saved to or read from the database.
In reply to Michele Nasoni

Re: My pg file are read as iso8859

by Nathan Wallach -
Support for UTF-8 PG files in the main release of WW starts with version 2.15. In that version of WW (webwork2 and pg) the PG files are always read as UTF-8, and the problem editor will save files as UTF-8.

I'm running a WW 2.15 server (with some local patches) which successfully processes UTF-8 problem files.

If you have an earlier version of WW installed, I do not think it will work unless you or someone else installs the many code changes which added UTF-8 support from the pull requests on GitHub which were used to add UTF-8 support.

Assuming you are using WW 2.15 and having a problem with files you uploaded to the server - the thing I would check is how you uploaded the files. It is possible that the files were somehow corrupted/converted when they were uploaded. I'm assuming that you probably used the File Manager upload. If so, try setting the "binary" format mode from the File Manager (radio button under the upload button) to see if that helps. It is possible that with "Text" or "Automatic" mode WW is making some changes to the file as it is uploaded which could potentially corrupt the file. Another option is uploading via a TGZ archive file which WW should "unpack" but which should avoid any of the files being subjected to changes.
In reply to Nathan Wallach

Re: My pg file are read as iso8859

by Michele Nasoni -
Thank you for all the reply yesterday I installed from the DVD and the version was the 2.13 and the IO.pm was not supporting the UTF8, I will install the lastest version from the git repository