PDA

View Full Version : Weird extra characters with PF 2.0 module



darrenan
August 27th, 2019, 00:30
I'm working on the PF 2.0 version of the action library module. I got the first couple items set up in the module and the actions are displaying with weird extra characters. For example, this item in the module:



<aquaticambush>
<actions>
</actions>
<cast type="number">0</cast>
<casting type="string"></casting>
<effects type="formattedtext">
<p>The monster moves up to its swim Speed + 10 feet toward the triggering creature, traveling on water and on land. Once the creature is in reach, the monster makes a Strike against it. The creature is flat-footed against this Strike.</p>
</effects>
<heightened type="formattedtext">
<p></p>
</heightened>
<level type="number">0</level>
<locked type="number">1</locked>
<name type="string">Aquatic Ambush</name>
<prepared type="number">0</prepared>
<requirements type="string">The monster is hiding in water and a creature that hasnt detected it is within the listed number of feet.</requirements>
<spcost type="number">0</spcost>
</aquaticambush>


After dragging into the actions tab, it ends up looking like:

28666

You can see that the 'Casting' field has an extra character. Also, another HTML encoded character in the 'Requirements' field has the same issue. Is the solution to just search/replace all the HTML encoded characters with their bracketed action equivalent or un-encoded character, or is this a bug in the PF 2.0 ruleset?

The XML above was created manually within a character sheet in fantasy grounds, and then copy/pasted from db.xml into the module's client.xml. In the original character sheet it displays fine with no extra character.

darrenan
August 27th, 2019, 00:36
In the XML above, the character in the <casting> element is 141 according to Visual Studio, which should be correct I think.

In the character I dragged and dropped the action on, the <casting> element does contain two characters, 194 and 141. And the apostrophe in the <requirements> element is 194 followed by 146.

darrenan
August 27th, 2019, 00:43
Also, wasn't sure if this thread should go here, in the PF 2.0 ruleset thread, or the House of Healing. Feel free to move it as you see fit.

LordEntrails
August 27th, 2019, 01:31
Are you using the correct encoding, UTF-8 I think, on your text file?

I'm grasping at straws here :)

Moon Wizard
August 27th, 2019, 03:04
The low is away for 10 days on vacation; so you may have to wait a bit for a definitive answer.

I don’t know why extra characters would be added; but I do know that a handful of less-used characters are used by PF2 to represent action symbols.

Regards,
JPG

darrenan
August 27th, 2019, 04:48
Changing the encoding of my client.xml to iso-8859-1 fixed the problem. Thanks for the hint @LordEntrails!

In fact, UTF-8 is wrong. The code point 141 is represented in UTF-8 (https://www.fileformat.info/info/charset/UTF-8/list.htm) as 0xC28D, or 194 followed by 141, which is what I was seeing. FG uses iso-8859-1 for everything, not UTF-8.

LordEntrails
August 27th, 2019, 20:22
Glad you got it and thanks for detailing the correct answer :)