Page 1 of 1

Strange behavior with emojis

Posted: Thu Jan 24, 2019 11:53 am
by Dirk Geppert
I like to use emojis for the graphical user interface. It is very easy to use and the browsers support emojis very well.
Just simply copy and paste e.g. from here: https://unicode.org/emoji/charts/full-emoji-list.html

Unfortunately there is a problem with the Spiderbasic IDE.

In some cases, I can't insert emojis into the source code. They will then be displayed as ?? or the emojis get lost after compiling (they are displayed wrongly coded). It only works if I put the emojis in an extra include file then, which has to be created in UTF-8 with BOM.

I use the IDE settings:

File Format: utf-8
Newline: windows

Re: Strange behavior with emojis

Posted: Sun Jan 27, 2019 1:33 pm
by Fred
Prodbably a font issue, could you try with one which supports your emoji ?

Re: Strange behavior with emojis

Posted: Tue Jan 29, 2019 2:08 pm
by Dirk Geppert
Hello Fred, I am using the font "Source Code Pro" and the emojis are displayed correctly in the editor. The emojis are also visible with other fonts.

Only after creating the webapp, the emojis disappear when I integrate them into the mainfile. As Include they are transferred correctly into the Javascript.

Best regards

Dirk

Re: Strange behavior with emojis

Posted: Wed Jan 30, 2019 9:40 am
by Fred
Could you post a small code showing the issue ?

Re: Strange behavior with emojis

Posted: Wed Jan 30, 2019 10:29 am
by Dirk Geppert
:oops: i've found the problem. It's not Spiderbasics fault.

I use client - server communication in all my projects and use the nice tool Spidebite.
This tool creates a UTF-8 file without BOM from the source file, but SpiderBasic seems to need it.
So I've just added some lines inside the SpiderBite functions.pbi function: SaveTextFile ()

Code: Select all

    If WriteStringFormat = #PB_UTF8
      WriteStringFormat(FF, #PB_UTF8 )
    EndIf
Please do apologize for any inconvenience.

Ciao Dirk

Re: Strange behavior with emojis

Posted: Wed Jan 30, 2019 10:29 am
by Fred
No problem