## WeBWorK Main Forum

### unicode minus sign

by Alex Jordan -
Number of replies: 3
Recently I've had a few students complain about the following. They submit an answer and get a (to them) cryptic error message. I've sleuthed out that they are getting some answer somewhere and copy-pasting it into the answer blank instead of typing directly. And what they paste has this character in it:
https://www.fileformat.info/info/unicode/char/2212/index.htm

The UTF-8 literal for this is \xe2\x88\x92.
(https://www.utf8-chartable.de/unicode-utf8-table.pl?start=8704&number=128&names=-&utf8=string-literal)

The message they get is like this one, sometimes slightly different depending on the characters surrounding the special minus sign:
DBD::mysql::st execute failed: Incorrect string value: '\xE2\x88\x9E, 2...' for column 'answer_string' at row 1 at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 837.

Is there anything we can do about this scenario to make the user experience better? For one thing, it appears the database is just disallowing this to be saved as a submitted answer. Is it possible to change that (and perhaps change this for similar special characters)?

Second, are we at the point where we can add these characters to MathObjects to be understood as equivalent to their plain keyboard counterparts?

### Re: unicode minus sign

by Nathan Wallach -
Alex -

Both aspects certainly deserve attention:
1. The database handling such characters. (I suspect that it the string was encoded into UTF-8 it would work, but we will need to make sure encoding occurs when writing to the database, and decode when reading back from the database).
2. It would certainly be nice to teach MathJax to recognize Unicode math operators as equivalent to their ASCII equivalents. I'm not sure how this should be best handled, and the interaction with MathJax (Answers Table, etc.) and MathQuill will need to be considered.

Please @ heads up to me, Davide, Florian, Andrew Parker and anyone else active in the UTF-8 / MathObjects / MathQuill support.

Sorry, but I suspect it may take time until it is fully solved, depending on when people can make time to address it.

Tani

### Re: unicode minus sign

by Sean Fitzpatrick -
While I understand the need to address this, I have to say that I'm all right with having things blow up on the students who feel they can cheat their way through the homework by copying everything from Symbolab.