Umlauts are broken #9

Closed
GSI opened this Issue Aug 19, 2012 · 5 comments

Comments

Projects
None yet
3 participants

GSI commented Aug 19, 2012

In the resulting email, umlauts are incorrectly displayed.

  • ö becomes ö
  • ä becomes À
  • ü becomes ÃŒ
  • ...

I have yet to look at the code, but maybe someone else knows the solution without needing to investigate first.

Contributor

IQAndreas commented Aug 19, 2012

I was able to fix it by adding the following line to commentsubmit.php after you have finished adding all the data to the message:

$msg=utf8_decode($msg);

Would you like me to show you exactly where to place it, or are you familiar enough with PHP to fix it on your own?

EDIT: I made the changes for you. See the commit mentioned below.

IQAndreas added a commit to IQAndreas/jekyll-static-comments that referenced this issue Aug 19, 2012

Fix for Issue #9
Decodes from `UTF-8` character formatting allowing characters from non-English languages to show up properly in `ISO-8859-1`.

GSI commented Aug 20, 2012

@IQAndreas Thanks for the quick fix! It seems to be working fine.

GSI commented Aug 20, 2012

Just did another test:

My KMail filter rule sends the email body to some custom commands. In that case only the variant without the utf8_decode() results in correct umlauts in the final files.

This is more important than readability in the mail itself, so I am reverting back to that variant.

IQAndreas added a commit to IQAndreas/jekyll-static-comments that referenced this issue Aug 20, 2012

Fix for GitHub issue #9
The message body should now handle umulauts correctly.
Contributor

IQAndreas commented Aug 20, 2012

Okay, try this version. Here I'm explicitly defining the character encoding of the email and subject to be UTF-8.
https://github.com/IQAndreas/jekyll-static-comments/tree/patch-1

Or if you only want a list of the changes made:
IQAndreas/jekyll-static-comments@dd18ae9

The commit includes a minor change to the comment template, which may or may not be necessary. I'm not in a position to test if it works at the moment, so could you give it a try yourself and let me know if it works properly? Otherwise, I'll give it a try tomorrow.

Contributor

IQAndreas commented Aug 21, 2012

Completely separate issue (normally I would ask this via email, but you have none provided in your profile), would your KMail filter have an easier time if it attached the comment to the email as a yaml file, rather than scrape it from the email body?

(On a more related note, in my testing, doing this causes characters with umlauts to show up just fine in the resulting text file.)

EDIT: This discussion has been moved to email.

@mpalmer mpalmer closed this Mar 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment