• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

German "Umlaute" (ä, ü, ö, ß) in compliments module

Scheduled Pinned Locked Moved Troubleshooting
6 Posts 2 Posters 8.0k Views 1 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    beck0r
    last edited by May 27, 2017, 10:56 AM

    Hi guys,

    I have customized the compliments-module to my needs and added my own compliments. Therefore I’ve used German and phrases containing so called “Umlaute” like "ä, ö, ü and ß).

    Unfortunately it shows me the following encoding issue whilst I’m trying to place the word “Genieße” which means “enjoy” :)

    0_1495882347247_upload-19456d2d-eeb3-4da2-853a-a58a3e1753ad

    I already assumed that this must have to do with the encoding of config.js.
    When I open config.js with WinScp editor I get the following:

    0_1495882444722_upload-a6daf719-51f4-4971-9e8c-595ce32fa77c

    With Notepad++

    0_1495882465586_upload-40aeccb8-8ba1-410a-bd24-c6a485cb20fe

    I have changed the encoding to UTF-8, saved the file and uploaded it to my MM. But… without success, after a restart of MM and the pi the issue is still there.

    Do you have any advice?

    Thank you!

    PS: Since the compliments module is a default module I’ve opened it in this area. Please feel free to move the topic.

    A 1 Reply Last reply May 27, 2017, 12:14 PM Reply Quote 0
    • A Offline
      Anhalter42 @beck0r
      last edited by May 27, 2017, 12:14 PM

      @beck0r I’ve got at least one “ö” in my compliments and it works; not sure why, though. You can try using an external .json file for your compliments, since thats what I did.

      1 Reply Last reply Reply Quote 0
      • B Offline
        beck0r
        last edited by beck0r May 27, 2017, 1:11 PM May 27, 2017, 1:10 PM

        Ok so here’s what I did to get that going

        • At first created my own .json file named “custom_complis.json” at the following path
        /MagicMirror/modules/default/compliment
        
        • Added my compliments to the external file by using the syntax described here https://github.com/MichMich/MagicMirror/tree/develop/modules/default/complimentst

        • Changed my config.js to…

        		{
        			module: "compliments",
        			position: "lower_third",
        			updateInterval: '20000',
        			config: {
        				remoteFile: 'custom_complis.json'
        				}
        		},
        
        • Restart MM
        • At this point the “umlauts” we’re still shown as unknown characters
        • Connected myself to the pi via WinSCP and browsed to my custom .json file
        • Opened my “custom_complis.json” file with notepad++ and changed the encoding to “UTF-8”
        • Restart MM -> Working

        Thank you

        1 Reply Last reply Reply Quote 0
        • B Offline
          beck0r
          last edited by beck0r May 27, 2017, 5:07 PM May 27, 2017, 4:44 PM

          errr… after a restart of the pi the custom file doesn’t load anymore :-(
          I don’t get it…can somebody help me?

          A 1 Reply Last reply May 27, 2017, 6:45 PM Reply Quote 0
          • A Offline
            Anhalter42 @beck0r
            last edited by May 27, 2017, 6:45 PM

            @beck0r I guess you changed something ;) just restarting doesn’t brake anything.

            1. So, what do you see? Standard compliments? Nothing? Error message?
            2. Does it work with compliments embedded into config file?
            3. Could you post config and remote compliments file?
            B 1 Reply Last reply May 28, 2017, 7:03 AM Reply Quote 0
            • B Offline
              beck0r @Anhalter42
              last edited by May 28, 2017, 7:03 AM

              @Anhalter42
              Sorry I was a little bit frustrated after a long day in front of the PC… I have validated my code against JSONLint aaaaaaaaaand… a single quotation mark " was missing in the middle of the file ;)

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                4/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy