This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
davidgumazon's profile picture

How many valid characters in CC

Started by davidgumazon, 15 March 2015 - 09:10 AM
davidgumazon #1
Posted 15 March 2015 - 10:10 AM
Hi Guys i want to know how many Characters valid in CC to read file safely?
cuz i want make ID Generator for ComputerCraft Adds-On. ;)/>

Aa,Bb,Cc,Dd,Ee,Ff,Gg,Hh,Ii,Jj,Kk,Ll,Mm,Nn,Oo,Pp,Qq,Rr,Ss,Tt,Uu,Vv,Ww,Xx,Yy,Zz (26x2)
0,1,2,3,4,5,6,7,8,9 (10)
!@#$%^&amp;*()-=_+{}:"<>?|[]\;',./ (30)
Unknown? (??)

like Copyright mark,Registered mark, and ?
RoD #2
Posted 15 March 2015 - 05:54 PM
There are currently 94 characters (32 to 126 in decimal) You can see here the decimal value:
Spoiler
TheOddByte #3
Posted 16 March 2015 - 09:36 PM
Well there's more than that, there's also some special characters. I'll see if I find the topic with the answer, as I've seen it here in AaP.
RoD #4
Posted 17 March 2015 - 07:17 PM
Well there's more than that, there's also some special characters. I'll see if I find the topic with the answer, as I've seen it here in AaP.

But within computercraft? I mean i have ran a loop that converts to bytes the iteration number so i tested from 0 to (more or less) 500 and i only got displayable characters within the range of 32-126. So you mean there is more? I know that you can write to a file and use charachters like Á, Ã, Â if you use a text editor, and i also know you can save the returned value of, example: string.char(128) and save it to a file, but nothing more. I will wait for your response, because if we can use more characters that would be awesome.
TheOddByte #5
Posted 17 March 2015 - 08:42 PM
Well string.char can take more than one argument you know? ;)/>
RoD #6
Posted 18 March 2015 - 07:57 PM
Well string.char can take more than one argument you know? ;)/>
From what i know string.char() will return a string with the chars corresponding to each byte given in the arguments. So i don't think that helps much. :P/>
TheOddByte #7
Posted 18 March 2015 - 10:00 PM
From what I remember, the person from the topic did something like this to get the special characters

string.char( 195, 63 )
Note: I've just put in random numbers :P/>
RoD #8
Posted 19 March 2015 - 08:11 PM

How? Look what it gave me:
Spoiler