Jump to content

Type a bullet point in the English.js file


Ryan_B

Recommended Posts

I have a handful of rules that I write in most of my projects. To save some time I've added them to my English.js file to access and write much quicker. My question is:

Does anybody know how to type a bullet point in the .js file so that it actually comes over as a bullet point?

 

I've tried \"•\"

But it returns "â¢"

 

I've tried escaping the bullet too \"\•\"

But it returns the same thing.

 

Any help would be appreciated.

Thanks

Link to comment
Share on other sites

That's a Unicode character, but the RuleTemplates.English.js file is saved with 8-bit ANSI encoding. You can do any of the following to make it work:

 

  • Save the file as Unicode, either UTF-8 or UTF-16. (In Notepad2, select Encoding -> Unicode, and re-save the file. Other text editors have different ways of specifying the encoding.)
  • Use the Chr function to call out the character by its Unicode code point, specifically: Chr(8226).
  • Use a Unicode escape in a literal string, with \u followed by the code point as four hexadecimal digits, specifically: "\u2022".
  • Use JavaScript's unescape function with a string literal containing an escaped character notation, specifically: unescape("%u2022").
  • Use JavaScript's decodeURIComponent function with a string literal containing escaped UTF-8 characters, specifically: decodeURIComponent("%E2%80%A2").

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...