Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/String-length/BBC-BASIC/string-length-2.basic
Normal file
12
Task/String-length/BBC-BASIC/string-length-2.basic
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CP_ACP = 0
|
||||
CP_UTF8 = &FDE9
|
||||
|
||||
textA$ = "møøse"
|
||||
textW$ = " "
|
||||
textU$ = " "
|
||||
|
||||
SYS "MultiByteToWideChar", CP_ACP, 0, textA$, -1, !^textW$, LEN(textW$)/2 TO nW%
|
||||
SYS "WideCharToMultiByte", CP_UTF8, 0, textW$, -1, !^textU$, LEN(textU$), 0, 0
|
||||
PRINT "Length in bytes (ANSI encoding) = " ; LEN(textA$)
|
||||
PRINT "Length in bytes (UTF-16 encoding) = " ; 2*(nW%-1)
|
||||
PRINT "Length in bytes (UTF-8 encoding) = " ; LEN($$!^textU$)
|
||||
Loading…
Add table
Add a link
Reference in a new issue