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

Strange behavior with emojis

by Dirk Geppert Thu Jan 24, 2019 11:53 am

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: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

by Fred Sun Jan 27, 2019 1:33 pm

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

Re: Strange behavior with emojis

by Dirk Geppert Tue Jan 29, 2019 2:08 pm

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: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

by Fred Wed Jan 30, 2019 9:40 am

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

Re: Strange behavior with emojis

by Dirk Geppert Wed Jan 30, 2019 10:29 am

: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: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: Strange behavior with emojis

by Fred Wed Jan 30, 2019 10:29 am

No problem
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 1 guest