Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

German umlauts (ä,ö,ü,ß) #68

Closed
ghost opened this issue Jul 17, 2015 · 8 comments
Closed

German umlauts (ä,ö,ü,ß) #68

ghost opened this issue Jul 17, 2015 · 8 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 17, 2015

Support for german umlauts

I'm using PHPStorm 8.0.3 with gfm-plugin for editing GFM.

Issue

When writing markdown containing german umlauts (ä,ö,ü,ß) in PHPStorm, saving it and close the file tab than reopen the file again and click on GFM Preview the umlauts aren't formatted well (instead the mystic question mark icon is shown).

I've found out that forcing the file encoding to UTF in PHPStorm fixes this issue as long as the file tab is open. If I close the file this change is lost and the question mark icons show up again.

It's a myth to me 'cause I always save files in UTF-8 and the plain markdown is so.

Reproduce Issue

This issue is easy to reproduce (indeed you need PHPStorm with gfm-plugin):

  1. Create a new *.md file in PHP Storm
  2. Paste this markdown in file: Everything is fine as long we don't use german umlauts (ä,ö,ü,ß). and save it
  3. Click on Gfm Preview and you'll see the file rendered fine (with german umlauts)
  4. Reopen (close and open) the file
  5. Now you can see the german umlauts are replaced by the question marks
Temporary fix

When opening a Markdown file with german umlauts force the file encoding to UTF-8 (or whatever supports umlauts aswell). This will fix it as long the file is open.

@ShyykoSerhiy
Copy link
Owner

Have problems with reproducing the issue. Can you please provide information about OS you use?

@ghost
Copy link
Author

ghost commented Jul 20, 2015

I've the following environment

  • Windows 7 (x64) with .NET 4.5
  • PhpStorm 8.0.3 with gfm-plugin 0.1.4

Additionaly I'm using Git (this is where the *.md files come from).

Note that this bug also appears for local stored files (without Git)!

My Intention

Intentionally I would say this bug lies in the way gfm-plugin renders the resulting HTML-File (per in-browser). Maybe the Browser is not configured to use an encoding which supports german umlauts ?

Another possibillity that crossed my mind is related to the file transfer.
As far as I understood the plugin transfers the file (MD) to the GFM-Parser which sends back the result (HTML). Maybe here is some encoding missing / not configured for german umlauts ?

Hope this helps. Elsethen I'll try to provide a container which reproduces this error.

@ShyykoSerhiy
Copy link
Owner

Thanks for quick response!
I'll ask you to help me narrow the problem. I believe that the problem probably lays in c implementation of GFM-Parser. Can you please try to disable offline markdown parsing(that will enable parsing via GitHub API) and try to reproduce the problem?
settings1

@ghost
Copy link
Author

ghost commented Jul 20, 2015

Disabling offline generation doesn't change anything (except an I/O Exception I received first time I opened *.md after forcing online generation - following times it ran without exceptions).

I noticed that even just changing the content of a 'broken' *.md file and then preview it (without forcing the encoding of file) resolves the bug. But same thing - if I close the file and reopen it the umlauts aren't encoded again.

I think the best hint we have is that the bug only appears when opening an *.md file but doesn't as long as it's updated at least once and kept open.

So this bug seems to be related with any kind of initialization / caching to me.

Btw: I'm currently at work so don't have the time to reproduce this on other machines. When I have the time (at the latest tomorrow) I'll try to reproduce it at home on several environments!

@Zoddo
Copy link

Zoddo commented Aug 23, 2015

👍

@ShyykoSerhiy
Copy link
Owner

Should be fixed in v0.1.9

@Vampire
Copy link

Vampire commented Dec 20, 2018

It is not or it is back.
I'm running on 0.1.14 and if I type my Name it renders as
grafik with offline generation.
If I either switch to online generation or set -Dfile.encoding=UTF-8 in the custom IDEA VM options, it renders correctly.

@ShyykoSerhiy
Copy link
Owner

I'm working on a complete rewrite that should be done more or less in a month.

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

No branches or pull requests

3 participants