Strange behavior with emojis

Just starting out? Need help? Post your questions and find answers here.
Dirk Geppert
Posts: 282
Joined: Fri Sep 22, 2017 7:02 am

Strange behavior with emojis

Post 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
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

Post by Fred »

Prodbably a font issue, could you try with one which supports your emoji ?
Dirk Geppert
Posts: 282
Joined: Fri Sep 22, 2017 7:02 am

Re: Strange behavior with emojis

Post 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
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

Post by Fred »

Could you post a small code showing the issue ?
Dirk Geppert
Posts: 282
Joined: Fri Sep 22, 2017 7:02 am

Re: Strange behavior with emojis

Post 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
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

Post by Fred »

No problem
Post Reply