1

The nordic characters æøå are displayed as question marks in JS static resource after reopening the file in the Developer Console. An alert box with these characters will also display as question marks.

How to save Javascript Static Resources as UTF-8?

  • Hi. I know that you can save files with UTF-8 encoding on Notepad++. – Martin Lezer Jan 30 '17 at 8:16
  • Developer console is not the best place to edit static resources, either use download and edit in notepad++ as suggested by @MartinLezer; or use Mavensmate which is by far the best method! – Raul Jan 30 '17 at 10:05
1

You can use default notepad in Windows to change the encoding to UTF-8. Please refer this Salesforce article describing how to change CSV encoding. But this is same for any text based files. Refere to point 8 and 9.

enter image description here

0

While using Mavensmate / Sublime, instead of saving a static resource by clicking on 'Save' or Ctrl + S, Please go to File Menu -> Save with encoding -> UTF-8

Screenshot of the same below

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.