Starfinder Playlist
Page 1 of 2 12 Last

Thread: Native letters

  1. #1

    Native letters

    Hi

    I think I have see the answer to this question some where in the forum, but I can't find it again.

    I'm adjusting an extension to Danish, but when the skill names written in the Lua file is loaded it don't use the Danish letter.

    The tekst in the lua scrip looks like this:

    Skills =
    { ["Første hjælpe"] = { Base="INT", Category="Grundf�rdigheter", Grund="INT", Kost="1"},

    In the attached picture you can see that the letters "ø" and "æ" looks very odd. It is only for the letters written directly in the lua script. It works fine the xml files due to the iso-8859-1 standard.

    What to do I have to do to make lua read Danish letters?

  2. #2
    FG uses a single byte string representation to translate text from Lua and database values into visible data on the screen. The font files (FGF) are a collection of 256 bitmaps rendered for each character in a single byte representation of that font. Depending on which font was used to render the FGF files, there can be differences in the actual glyphs/bitmaps displayed for those characters.

    A couple thoughts:
    * It could be the font missing certain glyphs for those characters. (i.e. not a true/full ISO-8859-1 output)
    * It could be that the characters are being translated incorrectly somewhere along the way (Lua, FG API, ...)

    I'm able to type those characters directly into 3.5E and 5E rulesets in the Skills sections, and see them correctly. So, I'm assuming it's a different ruleset with old font files.

    Which ruleset are you modifying?

    Regards,
    JPG

  3. #3
    Hi moon Wizard

    It's the BRP ruleset, that I'm modifying.

    A couple thoughts:
    * It could be the font missing certain glyphs for those characters. (i.e. not a true/full ISO-8859-1 output)
    * It could be that the characters are being translated incorrectly somewhere along the way (Lua, FG API, ...)
    I think it's a problem between Lua and FG api. When I write one of the characters in a string field in FG, it is shown correct.

  4. #4
    It has something to do with the existing encoding of the brpscript.lua file that you are modifying. Make sure that you set the encoding on the file you are creating that contains that string to ISO-8859-1.

    I verified the existing issue by:
    * Opening brpscript.lua file.
    * Pasting in new skill line just below "First Aid" skill line.
    * Saving file
    * Open new campaign and create new character.

    To fix,
    * I opened the brpscript.lua file.
    * Used my text editor (Notepad++) to specifically set the encoding to ISO-8859-1
    * Noted that the previously pasted text was now mangled (exactly like messed up display before)
    * Replaced the skill with the same text re-pasted from the forum.
    * Saved file
    * Opened character and found correct skill display.

    Cheers,
    JPG

  5. #5
    Thanks Moon, but how and where in the brpscript.lua file did you set the encoding?
    Last edited by Claus; November 23rd, 2014 at 13:10.

  6. #6
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    Claus for XML its usually the first line in these files:
    <?xml version="1.0" encoding="iso-8859-1"?>
    Im not sure how you do it in LUA...

  7. #7
    Ok - thanks

  8. #8
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,411
    Quote Originally Posted by Claus View Post
    Thanks Moon, but how and where in the brpscript.lua file did you set the encoding?
    If you're using Notepad++, open the LUA file and select Encoding -> Character Sets -> Western European -> ISO 8859-1
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  9. #9
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,685
    Blog Entries
    1
    +Trenloe - I did see that in searching... so for the LUA you just need to save the file with the correct encoding?
    You dont actually add any character sets / encoding tags / instructions.

  10. #10
    Hi Trenloe

    That worked! Thanks!

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
  •  
5E Product Walkthrough Playlist

Log in

Log in