Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a crash when rendering unsupported characters like "Å". #102

Merged
merged 2 commits into from
Jan 24, 2018

Conversation

sskodje
Copy link
Contributor

@sskodje sskodje commented Jan 21, 2018

This fixes a crash when inputting characters or symbols not supported by the font. The issue was discovered using norwegian letters "æ, ø or å".

Copy link
Collaborator

@alexreg alexreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good; just see my one comment.

@@ -1,4 +1,4 @@
using System;
using System;
Copy link
Collaborator

@alexreg alexreg Jan 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's going here? Seems like an identical line, hrmm. Or maybe a BOM was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea..

Copy link
Contributor Author

@sskodje sskodje Jan 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what git diff says.

@@ -1,4 +1,4 @@
-<EF><BB><BF>using System;
+using System;^M

I must admit not exactly sure what this means or how i fix it.

Copy link
Collaborator

@alexreg alexreg Jan 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, it's a Windows-style line ending (^M is a carriage return). Maybe this will help: https://superuser.com/questions/194668/grep-to-find-files-that-contain-m-windows-carriage-return. Just amend the commit, of course.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah i figured it out, the file had been saved as UTF-8 instead of UTF-8-BOM. It should be fixed now.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding BOM: we've discussed these a while ago, but nobody was particularly interested, so I single-handedly decided to let the BOM stay as it is. Probably we'll need a small research regarding current behavior of compilers in case we want to remove it. Current "consensus" is that we use BOM (because it helps .NET compilers to work with Unicode in sources), and I'd prefer everyone (incl. myself) to not change that without further discussion.

@alexreg
Copy link
Collaborator

alexreg commented Jan 21, 2018 via email

@ForNeVeR
Copy link
Owner

ForNeVeR commented Jan 22, 2018

Thank you for the contribution (and thanks to Alexander for initial review!).

I'm going to review that (and probably merge) tonight; ETA 12 hours.

As a side note: we do care about internationalization, it's just our font doesn't support most of the unicode characters. We want to eventually do something about it. For now, you could use \text{æøå} in your formula, it will fall back to Arial font (you may change it).

@ForNeVeR ForNeVeR self-requested a review January 22, 2018 05:17
@ForNeVeR ForNeVeR self-assigned this Jan 22, 2018
@ForNeVeR ForNeVeR merged commit 03a0f25 into ForNeVeR:master Jan 24, 2018
@ForNeVeR
Copy link
Owner

Again, sorry for the delay and thank you for the contribution! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants