As a sheet author, I got a private bug report from somebody who used my "Earthdawn by FASA" sheet. I use extended UTF-8 characters as a prefix to abilities so that the Token Actions group up such that all weapons are grouped together, etc. I use the following characters. Earthdawn.Constants = {
CommaReplace: "Ñ", // Character Ñ Character name LATIN CAPITAL LETTER N WITH Tildi Hex code point 00D1 Decimal code point 219 Hex UTF-8 bytes C3 91
ColonReplace: "Ò", // Buttons don't like colons, so anytime we want one in a button, replace it for a while with this. Character Ò Character name LATIN CAPITAL LETTER O WITH GRAVE Hex code point 00D2 Decimal code point 210 Hex UTF-8 bytes C3 92
SymbolTalent: "ı", // small i dotless: &# 305;
SymbolKnack: "ķ", // K with cedilla: &# 311;
SymbolSkill: "ş", // S with cedilla: &# 351;
SymbolWeapon: "⚔", // Crossed swords: &# 9876;
SymbolSpell: "⚡", // Lightning Bolt or High Voltage: &# 9889;
SymbolTarget: "➴" }; // Heavy Black-Feathered South East Arrow: &# 10167; Used as a grouping with a high number, to be ordered last.
Both of the Macro's that are also Token Actions that start with SymbolTarget instead of having the arrow pointing down and right, had three question marks. In addition, (and this might be a separate problem), Another Macro / Token Action that does not have any weird characters whatsoever is also showing as starting with three question marks. When I just paste my API code that creates these macros into a custom API script, it always works fine. But when I add the script from the script library, it always has the three question marks. When I look at the code in the Roll20 github repository, everything looks fine (I see the special symbols, nothing is in front of the other macro name). But when I import the script from the script library, I see that "Attrib" now starts with a red symbol that is nether in my text editor, nor visible in the roll20 github repository. The Arrows however still seem fine in the imported version. So my code seems to behave differently depending upon what route it takes to get to campaign. Copied from my text editor directly to Roll20 API. Fine. Uploaded to github, merged into the script library and imported. Extra characters show up when looking at the imported code, but it seems to work more or less OK. Uploaded to github, merged into the script library and added. All the non-plain vanilla characters turn into ether 3 or 5 question marks. Any ideas as to what is going on and what I can do to fix it? I am thinking of maybe instead of trying to store the value as a literal, maybe make these a function that returns a result from .fromCharCode()? So I have an idea for one way to fix it, but would like an idea of what people think is going on and why it is happening, and what might be the most appropriate fix. Thanks.