Page 1 of 1

All the Unicode characters and CHR() [Resolved]

Posted: Wed May 29, 2024 7:12 pm
by Kwai chang caine
Hello at all

I try to write all the UNICODE characters with Chr(), but apparently it's not also easy than that :oops:
I go to Wikipedia page
https://en.wikipedia.org/wiki/List_of_U ... characters
If i want write the "Ƶ", i see a Decimal column with "437" number
U+01B5 Ƶ 437 Latin Capital Letter Z with stroke
So i write

Code: Select all

RenameFile("D:\Nouveau dossier", "D:\" + Chr(437))
and my folder is named now "Ƶ" chr(437) 8)

But if i want use a Cyrillic character for exampler
The table on Wikipedia not have decimal column :|
U+04E8 Ө Cyrillic Capital Letter Barred O 0633
And if i write

Code: Select all

RenameFile("D:\Nouveau dossier", "D:\" + Chr(0633))
My folder is not named "Ө" but "ɹ" :shock:

Is it possible to write all the characters of the world, with only Chr() function and without adding or modify orginal Windows ?

Have a good day

Re: All the Unicode characters and CHR()

Posted: Wed May 29, 2024 9:16 pm
by idle
Use the chr function in this module
https://github.com/idle-PB/UTF16

Re: All the Unicode characters and CHR()

Posted: Wed May 29, 2024 9:27 pm
by Kwai chang caine
Hello IDLE, happy to talk to you

Apprently your module is full functions :shock:
I take a look tomorrow and say to you the result, because in France it's really time to eat and sleep (22h30) :wink:
Thanks a lot and good day for you 8)

Re: All the Unicode characters and CHR()

Posted: Wed May 29, 2024 10:32 pm
by idle
sorry, I was on my phone

Code: Select all

Procedure.s StrChr(v.i) ;return a proper surrogate pair for unicode values outside the BMP (Basic Multilingual Plane)
    Protected chr.q
    If v < $10000
      ProcedureReturn Chr(v)
    Else
      chr = (v&$3FF)<<16 | (v-$10000)>>10 | $DC00D800
      ProcedureReturn PeekS(@chr, 2, #PB_Unicode)
    EndIf
  EndProcedur


Re: All the Unicode characters and CHR()

Posted: Thu May 30, 2024 12:30 am
by Tawbie
Hello KCC,

You can write 4 Hex digit Unicode code points (characters) using Chr() as long as they are supported by the font you are using.
Easiest to just express the code point (without the U+) in hexadecimal, eg.

Code: Select all

Debug Chr($01B5)
Debug Chr($04E8)

; Debug Output
; Ƶ
; Ө

Re: All the Unicode characters and CHR()

Posted: Thu May 30, 2024 12:32 am
by TassyJim
But if i want use a Cyrillic character for exampler
The table on Wikipedia not have decimal column :|

U+04E8 Ө Cyrillic Capital Letter Barred O 0633

And if i write

RenameFile("D:\Nouveau dossier", "D:\" + Chr(0633))

Plain text
My folder is not named "Ө" but "ɹ" :shock:
04E8 is 1256 decimal

Code: Select all

Debug Chr(1256)
Your font has to have support for the character or you will end up with (usually) a box instead.

Re: All the Unicode characters and CHR()

Posted: Fri May 31, 2024 11:56 am
by Kwai chang caine
YEEEESSS !!!!

Image

It's a miracle !!!! :shock:

Image

KCC have all understand :mrgreen: 8)

Thanks to you three, i can now, named hundred folders of my hard drive with an "Unique one letter name"
For replace all my tree of files from this normal format
My long name folder 1
. . My long name folder 2
. . . My file 1.txt
. . My long name folder 3
. . . My file 1.txt
. . . My long name folder 4
. . . . My file 1.txt
by this "only one letter name" format
A
. . ᔢ
. . . My file 1.txt
. . ℣
. . . My file 1.txt
. . . ⅁
. . . . My file 1.txt
Because MICROSOFT have not thinking to give the possibility to create a personal ID at each folder :twisted:
With WINDOWS it's impossible to differentiate a folder with another folder, except with his name and path (and his content...who can changed too) :shock:
The only one method, is adding an horrible "desktop.ini" file inside him :|
in my opinion...whoever was responsible for creating the folder function....spent more time in front of the MICROSOFT coffee machine than in front of their PC :lol:

However, it was not complicated to be able to add a simple number to the NTFS structure, which would have allowed us to recognize any folder even if we changed his name or moved it in the tree structure of the hard drive :idea:
It's easy to recognize a file, but a folder...impossible :|

Thanks a lot at you all my friends for your preious help and kindness
Have a very very very good day 8)

Re: All the Unicode characters and CHR() [Resolved]

Posted: Fri May 31, 2024 12:18 pm
by AZJIO
C:\Windows\System32\charmap.exe
The program will show which characters are used in the selected font.

Re: All the Unicode characters and CHR() [Resolved]

Posted: Fri May 31, 2024 12:30 pm
by Kwai chang caine
Hello AZJIO :D
Thanks for this tips, i not know it
With it and the previous help of friends i can now better use this UNICODE of misfortune :oops:
Have a good day

Re: All the Unicode characters and CHR() [Resolved]

Posted: Fri May 31, 2024 6:28 pm
by Bitblazer
You may need GNU Unifont

Re: All the Unicode characters and CHR() [Resolved]

Posted: Fri May 31, 2024 6:53 pm
by Kwai chang caine
Hello Bitblazer :D
Thanks for your link 8)
I have found a BMP font, but i don't know if it's usable with W10 :oops: