{"action":"created","issue":{"url":"https://api.github.com/repos/gsand/mark2/issues/46","labels_url":"https://api.github.com/repos/gsand/mark2/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/gsand/mark2/issues/46/comments","events_url":"https://api.github.com/repos/gsand/mark2/issues/46/events","html_url":"https://github.com/gsand/mark2/issues/46","id":120340211,"number":46,"title":"mark2 doesn't start with unicode characters in mark2.properties","user":{"login":"totemo","id":1934688,"avatar_url":"https://avatars.githubusercontent.com/u/1934688?v=3","gravatar_id":"","url":"https://api.github.com/users/totemo","html_url":"https://github.com/totemo","followers_url":"https://api.github.com/users/totemo/followers","following_url":"https://api.github.com/users/totemo/following{/other_user}","gists_url":"https://api.github.com/users/totemo/gists{/gist_id}","starred_url":"https://api.github.com/users/totemo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totemo/subscriptions","organizations_url":"https://api.github.com/users/totemo/orgs","repos_url":"https://api.github.com/users/totemo/repos","events_url":"https://api.github.com/users/totemo/events{/privacy}","received_events_url":"https://api.github.com/users/totemo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-04T06:09:13Z","updated_at":"2015-12-30T22:19:58Z","closed_at":null,"body":"If you include a Minecraft colour code sequence (using the unicode section sign, U+00A7) in mark2.properties, then mark2 fails to start.\r\n\r\nWhen this happens, mark2 commands like ~stop, ~restart are rendered non-functional.\r\n\r\nMark2's initialisation sequence is, in part:\r\n * daemonise, redirecting all standard file handles to /dev/null\r\n * load the configuration file\r\n * open Twisted Python's log file\r\n\r\nWhen there is a unicode character in mark2.properties, an exception is raised:\r\n```UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)```\r\n\r\nat: https://github.com/gsand/mark2/blob/master/mk2/properties.py#L80\r\n\r\nHowever, it is not possible to see this exception because standard output is /dev/null and the Twisted log file isn't open yet.  You have to add custom debug logging to mark2 to see this happen, and you can't use `print` because stdout is dead.\r\n\r\nSo I raise this issue partly as a warning to others and of course to see if mark2 can more gracefully handle unicode in its config.\r\n"},"comment":{"url":"https://api.github.com/repos/gsand/mark2/issues/comments/168083162","html_url":"https://github.com/gsand/mark2/issues/46#issuecomment-168083162","issue_url":"https://api.github.com/repos/gsand/mark2/issues/46","id":168083162,"user":{"login":"gsand","id":1694336,"avatar_url":"https://avatars.githubusercontent.com/u/1694336?v=3","gravatar_id":"","url":"https://api.github.com/users/gsand","html_url":"https://github.com/gsand","followers_url":"https://api.github.com/users/gsand/followers","following_url":"https://api.github.com/users/gsand/following{/other_user}","gists_url":"https://api.github.com/users/gsand/gists{/gist_id}","starred_url":"https://api.github.com/users/gsand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsand/subscriptions","organizations_url":"https://api.github.com/users/gsand/orgs","repos_url":"https://api.github.com/users/gsand/repos","events_url":"https://api.github.com/users/gsand/events{/privacy}","received_events_url":"https://api.github.com/users/gsand/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T22:19:58Z","updated_at":"2015-12-30T22:19:58Z","body":"@totemo hmm, for a *long time* the server ignored section symbols (§) in the terminal, looks like that isn't the case anymore.\r\n\r\nBut I'm sure it happens to other characters too.\r\n\r\nI've been very busy lately due to by IRL business. I'll see if I can get this fixed soon.\r\n\r\nIn the meantime, use json messages.\r\n\r\n    tellraw @a [{color:red,text:\"Hey!\",bold:true},{color:gray,text:\" this is a WorldGuard style message!\",bold:false}]\r\n    tellraw @a [{color:light_purple,text:\"[Server]\"},{text:\" this is a 1.7 style message!\"}]\r\n    tellraw @a {\"color\":\"dark_purple\",\"text\":\"This server is being ran using \",\"extra\":[{\"color\":\"green\",\"text\":\"mark2.\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://github.com/gsand/mark2\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"color\":\"gold\",\"text\":\"View on Github\"}]}},\"bold\":\"true\"}]}"}}