Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -7,16 +7,33 @@ Print ChrCode$(ChrCode("a"))
\\ (,) is an empty array.
Function Codes(a$) {
If Len(A$)=0 then =(,) : Exit
Buffer Mem as byte*Len(a$)
\\ Str$(string) return one byte character
Return Mem, 0:=Str$(a$)
Inventory Codes
For i=0 to len(Mem)-1
Append Codes, i:=Eval(Mem, i)
Next i
=Codes
Function Codes(a$, localeID=1033) {
If Len(A$)=0 then =(,) : Exit
\\ Str$(string) return one byte character
oldlocale=locale
locale localeID
a=Str$(a$)
locale oldlocale
Codes=(,)
locale 1033
// 1 byte length returns 0.5 from len() ' 1 for 2 bytes.
// chr$(string) convert to UTF16LE with current LOCALE
For i=1 to len(a)*2
Append Codes, (chrcode(chr$(mid$(a,i,1 as byte))),)
Next i
locale oldlocale
=Codes
}
Print Codes("abcd")
\\ 97 98 99 100
Print Codes("abcdΩ", 1032)#str$(", ")
\\ 97, 98, 99, 100, 217
Function CodesUNICODE(a) {
If Len(a)=0 then =(,) : Exit
Codes=(,)
For i=1 to len(a)
Append Codes, (chrcode(mid$(a,i,1)),)
Next i
=Codes
}
Print CodesUNICODE("abcdΩ")#str$(", ")
\\ 97, 98, 99, 100, 937