Example: Emoji List App to work with USTRING in Basic and TopSpeed files

To try USTRING in Apps, Windows, Reports, Browse, Form, Lists I thought importing a List of Emojis would be straightforward. I found a free CSV with 5225.

Most of this is Wizard made then tweaked. I hope it might make a a useful test App to try some changes.

ProjEmojLst_20260820_144612_v2.ZIP (186.3 KB)

The Emoji list CSV from DataHub that looks below. I added a UTF-8 BOM.

Group,Subgroup,CodePoint,Status,Representation,Name,Section
Activities,event,1F383,fully-qualified,🎃,jack-o-lantern,E0.6
Activities,event,1F384,fully-qualified,🎄,Christmas tree,E0.6
Activities,event,1F386,fully-qualified,🎆,fireworks,E0.6
Activities,event,1F387,fully-qualified,🎇,sparkler,E0.6
Activities,event,1F9E8,fully-qualified,🧨,firecracker,E11.0
Activities,event,2728,fully-qualified,✨,sparkles,E0.6
Activities,event,1F388,fully-qualified,🎈,balloon,E0.6

It just has one Unicode column “Representation”. You cannot mix STRING and USTRING in a Basic file. I made this file in the DCT with all USTRING columns.

EmojisCSV     FILE,DRIVER('BASIC','/FIRSTROWHEADER=ON'),NAME('EmojisDataHub.csv'),PRE(EmCSV),BINDABLE,THREAD !                     
Record            RECORD,PRE()  
Group                USTRING(16)
Subgroup             USTRING(23)
CodePointHex         USTRING(55)
Status               USTRING(20)
Representation       USTRING(36)
Name                 USTRING(77)
SectionName          USTRING(8) 
                  END
              END

Because the Basic Driver supports PREVIOUS() the App has a Normal Browse / Form to view the CSV


There is an Import CSV that writes the below TPSW file with one USTRING:

EmojiList1     FILE,DRIVER('TOPSPEEDW'),NAME('EmojiList1.TpsW'),PRE(Emoj1)
KeyGroup           KEY(Emoj1:Group,Emoj1:Subgroup,Emoj1:CodePoint5),DUP,NOCASE
KeySubGroup        KEY(Emoj1:Subgroup,Emoj1:CodePoint5),DUP,NOCASE
KeyCodePointHex    KEY(Emoj1:CodePointHex),DUP,NOCASE
KeyName            KEY(Emoj1:Name),DUP,NOCASE
KeyLineNo          KEY(Emoj1:LineNoCSV),DUP,NOCASE
Record             RECORD,PRE()
Group                 STRING(15)
Subgroup              STRING(22)
CodePointHex          STRING(54)
CodePointUTF16        USTRING(11)  !<-- not used yet
Status                STRING(19)
Representation        USTRING(36)  !<-- Unicode
Name                  STRING(76)
SectionName           STRING(7)
CodePoint5            STRING(5)
LineNoCSV             LONG
                   END
               END

Then I wizard Browse, Form, Report and tweaked those.

Having one USTRING did not seem like much of a test so I duplicated the File and made everything USTRING. I named that “List 2” and the first “List 1”

EmojiList2       FILE,DRIVER('TOPSPEEDW'),NAME('EmojiList2.TpsW'),PRE(Emoj2)
Keys same ... +
KeyRepresentation   KEY(Emoj2:Representation),DUP,NOCASE ! Key with Emojis
Record              RECORD,PRE()
Group                  USTRING(16)
Subgroup               USTRING(23)
CodePointHex           USTRING(55)
CodePointUTF16         USTRING(11)
Status                 USTRING(20)
Representation         USTRING(36)
Name                   USTRING(77)
                    END
                 END

Then I duplicated the Browse, Form and List so you can try all the Template and ABC code with identical files and procedures except the type changes to USTRING. E.g. try Incremental Locator by Name with STRING and USTRING.

Very useful and pretty cool, thanks for posting it!