Page MenuHomePhabricator

Encoding issue in GraphViz extension
Closed, DeclinedPublic

Description

<mscgen caption="äöüßÄÖÜ">
msc {
  Ä,Ö,Ü, ä, ö, ü, ß;

  ä->ä  [label="ä"];
  ö->ö  [label="ö"];
  ü=>ü  [label="ü"];
  ß=>ß  [label="ß"];
  Ä=>Ä  [label="Ä"];
  Ö=>Ö  [label="Ö"];
  Ü<<=Ü [label="Ü"];
}
</mscgen>

This throws an encoding error:

Error detected at line 2: syntax error, unexpected characters. > Ä,Ö,Ü, ä, ö, ü, ß;

The characters are no parsed as UTF-8 but as US-ASCII.

According to the changelog this issue should be fixed in the side of mscgen, so it appears that the MW extension is creating some wrong handling of the characters.

Event Timeline

Temptuousinsolence raised the priority of this task from to Medium.
Temptuousinsolence updated the task description. (Show Details)
Temptuousinsolence changed Security from none to None.
Temptuousinsolence subscribed.
TheDJ subscribed.

Seems this extension doesn't have it's own phab project and/or external bug tracker.
Since projects in phab are relatively cheap, time to add one ? ping @Aklapper

[offtopic] @TheDJ: I will only create a comment in WM Phab if a GraphViz maintainer would like to follow tickets here. We've had cases of "I create a component in Wikimedia Bugzilla without asking the maintainer" to later find the project's canonical bugtracker somewhere else. Don't want bug reports in two places.

@Aklapper, please add a phab project for GraphViz. There is no external bug tracker. Thanks.

Here's an example that works:

<mscgen caption="äöüßÄÖÜ" uniquifier="1">
msc {
  A,O,U,a,o,u,B;
  a->a  [label="ä"];
  o->o  [label="ö"];
  u=>u  [label="ü"];
  B=>B  [label="ß"];
  A=>A  [label="Ä"];
  O=>O  [label="Ö"];
  U<<=U [label="Ü"];
}
</mscgen>

Perhaps mscgen only accepts non-ascii characters as labels. The encoding of the file created by GraphViz is correct in the file system:

file -i Main_Page_msc_1.src
Main_Page_msc_1.src: text/plain; charset=utf-8

I don't think that there is anything that can be done to change this behavior in the GraphViz extension. I suggest asking the mscgen maintainer if this behavior is by design. Thanks.

Welterkj claimed this task.

@Aklapper, please add a phab project for GraphViz. There is no external bug tracker. Thanks.

Please see https://www.mediawiki.org/wiki/Phabricator/Creating_and_renaming_projects for required info and create a separate request. Thank you!