DICE PACKS BUNDLE
  1. #1

    4E Text Power parsing error.

    When copying text from the chat window by dragging the text to a power description, the Effect roll over highlight is misplaced.


  2. #2
    I'm not seeing this on my side. See attached video.

    Regards,
    JPG
    Attached Files Attached Files

  3. #3
    Moon this is actually an ongoing issue but is really about random highlights that can occur. Has been reported before but I have no repeatable method.

    Jason

  4. #4
    I'm going to need a repeatable method to be able to find and resolve the issue; so please let me know if you find one.

    Thanks,
    JPG

  5. #5
    Copying from a table seems to repeat consistently using this text:

    Glancing strike off forehead causes blood to flow into foe’s eyes. -1 power bonus to the attack roll (save ends) or dons a headband. Wasn’t that a blunt weapon?

    Looks like the highlight is shifted two characters to the right.


  6. #6
    Additional info

    I copied text from a PDF to the Table above which has the error. When manually adding the text directly into the table field I do not get this error.

    To test, I copied the text from the Table (which was copied from a PDF) and pasted it into notepad. I then saved the file with UTF-8 format. I closed the file and reopened it and got this:

    Blow to foe’s neck. Foe is Stunned until the end of your next turn as he works out why that didn’t kill him.

    I corrected with proper punctuation, copied it back to the table, then dragged text to the power description and the highlight worked correctly.

    Maybe PDF copy (CTL C) to the Table is causing some formatting issue with punctuation symbols?

    *edit* I tested another and got

    Original
    -1 power bonus to attack rolls (save ends).

    Notepad save
    –1 power bonus to attack rolls (save ends).
    Last edited by kevininrussia; March 14th, 2022 at 23:27.

  7. #7
    It looks like it is because the dash in the "-1" is not a minus sign; but one of the UTF-8 special dash characters (en dash, em dash, etc.). I was not able to recreate by typing in the data; but I was to recreate if I specifically looked for an "en dash" online and pasted in instead.

    Unfortunately, the internal power parsing routines in Lua do not support UTF-8 characters at this time; as Lua only supports single byte strings and thus the special dash characters are taking three bytes. Also, the pattern matching in Lua works well for multiple single byte comparisons at once, but not for multiple multi-byte comparisons at once. So, the Lua parsing routines would need a bunch of extra logic to handle the special dashes, which we may do at some point or we may tackle another way.

    As a workaround, you'll need to search and replace those characters in a separate app before pasting into FG; or set up a text editor with a text document that is in ASCII format so it might do the conversion automatically by pasting there and then into FG; or search and replace the campaign/module XML data in a text editor to replace em dash and en dash characters.

    Sorry I don't have a better solution, but there's a lot going on that would need to be solved.

    Regards,
    JPG

  8. #8
    To be clear on my testing:

    Text copied from PDF's cause parsing highlight errors when there are punctuation marks like Apostrophe's.

    Solution. In FGU, backspace or delete the punctuation mark and replace or use Moons solution above.

  9. #9
    I've noticed the random highlight thing a lot with all the stuff I made in FGC that was brought over to FGU. It isn't just text, it's also highlighting random headers, etc. If I delete the text and enter new text the highlight goes away, but it doesn't go away just from deleting the text (there's still an empty "blue box" in the text field until I enter new text into that field while in FGU).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in