We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Do we have a general strategy for handling the file encoding of add-on component language files?

    I notice that many of the current lexicon topic files in Revo add-ons don’t specify the encoding in the file’s header comments (shouldn’t they?).

    What’s the best practice here?
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 28215
      • 4,149 Posts
      It is *strongly* recommended that all lexicon files be in UTF-8, since JSON tends to have problems with non-utf8 encodings.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 3749
        • 24,544 Posts
        Quote from: splittingred at Jan 16, 2011, 10:51 PM

        It is *strongly* recommended that all lexicon files be in UTF-8, since JSON tends to have problems with non-utf8 encodings.

        Thanks. I think I can easily go either way on it. Are the existing language files for your components all in UTF-8?

        I read that MySysGit has trouble with UTF-8 files (maybe it’s just file names). I’ve never had any trouble except for the EOL issues (where are we on that, BTW -- what’s the EOL convention for add-on files?). I think mine all have Windows EOLs, except inside the Git repository.

        We should probably have a page up at RTFM with best practices on file encoding and EOL for language files and maybe files in general with notes on various platforms. I couldn’t find one.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting