Package: unicodekonverter
Converts Hexadecimal Unicode Codes with the prefix 'U+/u+' in text to Corresponding CharactersTested against Windows 10 / Python 3.10 / Anacondapip install unicodekonverterConvertsHexadecimalUnicodeCodeswiththeprefix'U+/u+'intexttoCorrespondingCharactersThisfunctiontakesatextcontaininghexadecimalUnicodecodesandreplacesthemwiththeircorrespondingcharacters.ItutilizesaprecompiledTrieregexpattern(compiledatthefirstrun)toefficientlyidentifyandreplacetheUnicodecodes.Args:tex(str):TheinputtextcontaininghexadecimalUnicodecodestobeconverted.concurrent(intorNone):Thenumberofconcurrentthreadstouseduringpatternmatching.Ifprovided,thefunctionwillusemultiplethreadstoprocessthetextconcurrently.SettoNone(default)todisableconcurrentprocessing.Returns:str:TheinputtextwithhexadecimalUnicodecodesreplacedbytheircorrespondingcharacters.Example:text2='''U+25A0	Black squareU+25A1	White squareU+25A2	White square with rounded cornersU+25A3	White square containing small black squareU+25A4	Square with horizontal fillU+25A5	Square with vertical fillU+25A6	Square with orthogonal crosshatch fillU+25A7	Square with upper left to lower right fillU+25A8	Square with upper right to lower left fillU+25A9	Square with diagonal crosshatch fillU+25AA	Black small squareU+25AB	White small squareU+25AC	Black rectangleU+25AD	White rectangleU+25AE	Black vertical rectangleU+25AF	White vertical rectangleU+25B0	Black parallelogramU+25B1	White parallelogramU+25B2	Black up-pointing triangleU+25B3	White up-pointing triangleU+25B4	Black up-pointing small triangleU+25B5	White up-pointing small triangleU+25B6	Black right-pointing triangleU+25B7	White right-pointing triangleU+25B8	Black right-pointing small triangleU+25B9	White right-pointing small triangleU+25BA	Black right-pointing pointerU+25BB	White right-pointing pointerU+25BC	Black down-pointing triangleU+25BD	White down-pointing triangleU+25BE	Black down-pointing small triangleU+25BF	White down-pointing small triangleU+25C0	Black left-pointing triangleU+25C1	White left-pointing triangleU+25C2	Black left-pointing small triangleU+25C3	White left-pointing small triangleU+25C4	Black left-pointing pointerU+25C5	White left-pointing pointerU+25C6	Black diamondU+25C7	White diamondU+25C8	White diamond containing small black diamondU+25C9	FisheyeU+25CA	LozengeU+25CB	White circleU+25CC	Dotted circleU+25CD	Circle with vertical fillU+25CE	BullseyeU+25CF	Black circleU+25D0	Circle with left half blackU+25D1	Circle with right half blackU+25D2	Circle with lower half blackU+25D3	Circle with upper half blackU+25D4	Circle with upper right quadrant blackU+25D5	Circle with all but upper left quadrant blackU+25D6	Left half circle blackU+25D7	Right half black circleU+25D8	Inverse bulletU+25D9	Inverse white circleU+25DA	Upper half inverse white circleU+25DB	Lower half inverse white circleU+25DC	Upper left quadrant circular arcU+25DD	Upper right quadrant circular arcU+25DE	Lower right quadrant circular arcU+25DF	Lower left quadrant circular arcU+25E0	Upper half circleU+25E1	Lower half circleU+25E2	Black lower right triangleU+25E3	Black lower left triangleU+25E4	Black upper left triangleU+25E5	Black upper right triangleU+25E6	White bulletU+25E7	Square with left half blackU+25E8	Square with right half blackU+25E9	Square with upper left diagonal half blackU+25EA	Square with lower right diagonal half blackU+25EB	White square with vertical bisecting lineU+25EC	White up-pointing triangle with dotU+25ED	Up-pointing triangle with left half blackU+25EE	Up-pointing triangle with right half blackU+25EF	Large circleU+25F0	White square with upper left quadrantU+25F1	White square with lower left quadrantU+25F2	White square with lower right quadrantU+25F3	White square with upper right quadrantU+25F4	White circle with upper left quadrantU+25F5	White circle with lower left quadrantU+25F6	White circle with lower right quadrantU+25F7	White circle with upper right quadrantU+25F8	Upper left triangleU+25F9	Upper right triangleU+25FA	Lower-left triangleU+25FB	White medium squareU+25FC	Black medium squareU+25FD	White medium small squareU+25FE	Black medium small squareU+25FF	Lower right U+25FF triangle'''te=convert_2_unicode(text2)print(te)output:■Blacksquare□Whitesquare▢Whitesquarewithroundedcorners▣Whitesquarecontainingsmallblacksquare▤Squarewithhorizontalfill▥Squarewithverticalfill▦Squarewithorthogonalcrosshatchfill▧Squarewithupperlefttolowerrightfill▨Squarewithupperrighttolowerleftfill▩Squarewithdiagonalcrosshatchfill▪Blacksmallsquare▫Whitesmallsquare▬Blackrectangle▭Whiterectangle▮Blackverticalrectangle▯Whiteverticalrectangle▰Blackparallelogram▱Whiteparallelogram▲Blackup-pointingtriangle△Whiteup-pointingtriangle▴Blackup-pointingsmalltriangle▵Whiteup-pointingsmalltriangle▶Blackright-pointingtriangle▷Whiteright-pointingtriangle▸Blackright-pointingsmalltriangle▹Whiteright-pointingsmalltriangle►Blackright-pointingpointer▻Whiteright-pointingpointer▼Blackdown-pointingtriangle▽Whitedown-pointingtriangle▾Blackdown-pointingsmalltriangle▿Whitedown-pointingsmalltriangle◀Blackleft-pointingtriangle◁Whiteleft-pointingtriangle◂Blackleft-pointingsmalltriangle◃Whiteleft-pointingsmalltriangle◄Blackleft-pointingpointer◅Whiteleft-pointingpointer◆Blackdiamond◇Whitediamond◈Whitediamondcontainingsmallblackdiamond◉Fisheye◊Lozenge○Whitecircle◌Dottedcircle◍Circlewithverticalfill◎Bullseye●Blackcircle◐Circlewithlefthalfblack◑Circlewithrighthalfblack◒Circlewithlowerhalfblack◓Circlewithupperhalfblack◔Circlewithupperrightquadrantblack◕Circlewithallbutupperleftquadrantblack◖Lefthalfcircleblack◗Righthalfblackcircle◘Inversebullet◙Inversewhitecircle◚Upperhalfinversewhitecircle◛Lowerhalfinversewhitecircle◜Upperleftquadrantcirculararc◝Upperrightquadrantcirculararc◞Lowerrightquadrantcirculararc◟Lowerleftquadrantcirculararc◠Upperhalfcircle◡Lowerhalfcircle◢Blacklowerrighttriangle◣Blacklowerlefttriangle◤Blackupperlefttriangle◥Blackupperrighttriangle◦Whitebullet◧Squarewithlefthalfblack◨Squarewithrighthalfblack◩Squarewithupperleftdiagonalhalfblack◪Squarewithlowerrightdiagonalhalfblack◫Whitesquarewithverticalbisectingline◬Whiteup-pointingtrianglewithdot◭Up-pointingtrianglewithlefthalfblack◮Up-pointingtrianglewithrighthalfblack◯Largecircle◰Whitesquarewithupperleftquadrant◱Whitesquarewithlowerleftquadrant◲Whitesquarewithlowerrightquadrant◳Whitesquarewithupperrightquadrant◴Whitecirclewithupperleftquadrant◵Whitecirclewithlowerleftquadrant◶Whitecirclewithlowerrightquadrant◷Whitecirclewithupperrightquadrant◸Upperlefttriangle◹Upperrighttriangle◺Lower-lefttriangle◻Whitemediumsquare◼Blackmediumsquare◽Whitemediumsmallsquare◾Blackmediumsmallsquare◿Lowerright◿triangle