Comments (3)
Additional notes:
-
When MathJax is used to display equations, the "formatted" answer column contains an MathJax object which has the UTF-8 (Hebrew) text selected in the Popup displayed properly.
-
A possible root cause seems to be in
lib/Value/String.pm
:
- It seems likely that the problem is that there is either an extra or a missing conversion to UTF-8 being applied to the string being processes before it reaches it's final destination.
- Note also: The
quoteTeX
subroutine is triggering the use of$self->verb($s)
whenever a UTF-8 character (or anything else not in a very short list of allowed characters is detected):
sub quoteTeX {
my $self = shift; my $s = shift;
return $self->verb($s) unless $s =~ m/^[-a-z0-9 ,.;:+=?()\[\]]*$/i;
"\\text{$s}";
}
and it seems that with UTF-8 support added, many more characters could be handled by \text{}
without the need for \verb
. Finding the correct condition to use may be challenging.
from pg.
The image mode issue is due to the fact that md5_hex()
(used in EquationCache.pm line 89) can only accept characters with numbers up to 255 (see the last section of the MD5 documentation just above the "See Also".
One solution is to use
my $md5 = md5_hex(utf8::is_utf8($tex) ? Encode::encode_utf8($tex) : $tex);
rather than
my $md5 = md5_hex($tex);
at line 89.
I assume that for the html2xml
issue, you need to convert the non-ASCII unicode characters to their &#xXXXX;
format, so that U+1234 would become ሴ
.
I do not think this is a MathObject problem per se.
from pg.
#466 should be fixing the issue with EquationCache.pm, while openwebwork/webwork2#1089 should have fixed the issue with XMLRPC/html2xml.
Thus this issues seems to be resolved by the merged/in review PRs.
I'm closing this issue.
from pg.
Related Issues (20)
- Using upToConstant with complex numbers HOT 4
- keyboard issue with GraphTool HOT 8
- inconsistency in multiple choice macros HOT 4
- run-perltidy deletes .bak files
- Error answers now are escaped when they shouldn't be. HOT 1
- Cropping from pgfplots is not always working for final SVG output HOT 13
- variables declared with `my` lead to errors HOT 1
- student answers get spaces normalized
- iframeResizer, feedback popover, and mqeditor HOT 16
- Updating AnswerFormatHelp.pl HOT 5
- Viewing all correct answers at the same time HOT 4
- PTX "image" tag getting changed to "img" HOT 5
- error with brace and x HOT 9
- PG editor not decoding as expecting HOT 1
- macros/graph/PGnauGraphics.pl doesn't use unique name, which can break tests. HOT 1
- securtiy issues with braces HOT 2
- braces around math HOT 3
- Number with units in MathObject List doesn't work. HOT 9
- GraphTool not marking correct answers as correct HOT 2
- Feature request, show green checkmarks in feedback when partial feedback is hidden but answers are all correct. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pg.