Ryan_B Posted April 27, 2016 Share Posted April 27, 2016 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 Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 27, 2016 Share Posted April 27, 2016 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"). Quote Link to comment Share on other sites More sharing options...
Ryan_B Posted April 28, 2016 Author Share Posted April 28, 2016 Some examples would've been nice Dan. This is great, thank you sir. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.