The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Unicode char comparison puzzle
05-30-2018, 12:50 PM
Post: #1
Unicode char comparison puzzle
I'd like to print out all the juicy non '⛾' unicode characters between #2600h and #26FFh as per http://www.unicode-symbol.com/block/Misc_Symbols.html

Code:

EXPORT UNIFUN()
BEGIN
LOCAL cp, S:="";
PRINT();
FOR cp FROM #2600h TO #26FFh DO
  IF CHAR(cp) ≠ "⛾" THEN  // doesn't work 
    S := S + CHAR(cp);
  END;
END;
PRINT(S);
END;

The output on the prime prints most characters as '⛾', so I tried to filter out those chars out with the conditional expression
Code:
IF CHAR(cp) ≠ "⛾" THEN
but this doesn't work, as the '⛾' seems to refer to a specific unicode character/code point rather than to any unicode characters that look like '⛾'. Question 1: how do I effectively filter out the chars that look like '⛾' ?

When pasting the terminal output of the prime code above, from the prime emulator on my iPad to this thread, the output was surprising. More of the characters are rendered and there are many fewer '⛾' characters.

☀☁☂☃☄★☆☇☈☉☊☋☌☍☎☏☐☑☒☓☔☕☖☗☘☙☚☛☜☝☞☟☠☡☢☣☤☥☦☧☨☩☪☫☬☭☮☯☰☱☲☳☴☵☶☷☸☹☺☻☼☽☾☿♀♁♂♃♄♅♆♇♈♉♊♋♌♍♎♏​♐♑♒♓♔♕♖♗♘♙♚♛♜♝♞♟♠♡♢♣♤♥♦♧♨♩♪♫♬♭♮♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾♿⚀⚁⚂⚃⚄⚅⚆⚇⚈⚉⚊⚋⚌⚍⚎⚏⚐⚑⚒⚓⚔⚕⚖⚗⚘⚙⚚⚛⚜⚝⚞⚟​⚠⚡⚢⚣⚤⚥⚦⚧⚨⚩⚪⚫⚬⚭⚮⚯⚰⚱⚲⚳⚴⚵⚶⚷⚸⚹⚺⚻⚼⚽⚾⚿⛀⛁⛂⛃⛄⛅⛆⛇⛈⛉⛊⛋⛌⛍⛎⛏⛐⛑⛒⛓⛔⛕⛖⛗⛘⛙⛚⛛⛜⛝⛞⛟⛠⛡⛢⛣⛤⛥⛦⛧⛨⛩⛪⛫⛬⛭⛮⛯​⛰⛱⛲⛳⛴⛵⛶⛷⛸⛹⛺⛻⛼⛽⛾⛿

Thus it looks like the Prime cannot visually represent / print out all unicode characters, only a limited subset of them, Question 2: does anyone know the limits to the Prime's unicode support?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Unicode char comparison puzzle - tcab - 05-30-2018 12:50 PM
RE: Unicode char comparison puzzle - tcab - 05-31-2018, 01:34 AM
RE: Unicode char comparison puzzle - Tyann - 05-31-2018, 04:29 AM
RE: Unicode char comparison puzzle - tcab - 05-31-2018, 01:23 PM
RE: Unicode char comparison puzzle - Tyann - 06-01-2018, 04:30 AM
RE: Unicode char comparison puzzle - tcab - 06-01-2018, 07:48 AM
RE: Unicode char comparison puzzle - tcab - 06-01-2018, 10:35 AM



User(s) browsing this thread: 1 Guest(s)