I need a function to get a character from ASCII table LIKE this:
letter = CHAR (ascii_code_number)
For example with code number 65, the function must return character “A”.
How can i do it? Thank a lot,
I need a function to get a character from ASCII table LIKE this:
letter = CHAR (ascii_code_number)
For example with code number 65, the function must return character “A”.
How can i do it? Thank a lot,
It would be tedious, but could you build a database thing where one field is the ASCII number and another field is the letter? Then you could just search for one to get the other.
What is the use case here?
This function will be usefull for several interesting features. As a very simple example:
I hope this function will be able to use very soon in some way. Thank so much in advance.
Thank you for your advise. But a function will be better. Your solution will cause many tasks with the Server and the application will work very slowly.
Webtask.io - it is a built in Node.js function.
module.exports = function(context, cb) {
cb(null, String.fromCharCode(context.query.ascii));
}
You can use the Webtask editior to create and run the API, you no longer need to load Node on your machine (I just did this on a Chromebook).
It does seem a little odd creating a external serverless node function when Bubble itself runs on Node !
@ NigelG
Thank you for your advise. I am but a newbie on NodeJS. Could you please show me an example on Bubble, how can I use this function directly?
I also hope that Emmanuel will show us the way to use this function as a bult-in function of Bubble. It will be great!
Why can’t you assign a character code to a contact using a random string? In your example (“Contact will have code as “B”.”), I don’t see where the char -> number happens (or the other way around).
Char -> number happens here:
So the CHR() function will be very important for me and I think it will be useful even for other developers.
I think you can do this for number data, similarly as “:formated as …” for example “:converted to character”
I hope you will help me soon. Thank so much.
Why do you need this ? Is this something you have created ? Or is it from another application ?
How does being about to convert ASCII 65 into A help here ?
I think, I said clearly above:
By the way, if you have better solution for this issue I hope you will instruct me. Thank you in advance.
Thank you so much.
I have used Webtask.io to create an API: Char with 2 functions CHR(Code) & ASC(Char).
I have test with NodeJS: It worked perfect.
I have created also my Bubble plugin “Char” but I don’t know how to install to my app.
Could you help me, please !
I get the feeling that the design is a bad idea. What happens the first day you run out of relationship characters for a given slot?
You would be better to simply stick to a more traditional unique identifier, and stick to proper relational referencing between the entities.
Thank for your response.
My opinion is: with 64 bits character, you can’t run out.
With traditional unique indentifier ? Can you display just only related messages (every level 1 message) as a whole story ?
You could put all the previous messages into a list. That is easy, when you create the child you set the list to parent list :plusitem parent.
ASCII isn’t 64 bit though.
You could run out, basic ascii is 128 options, of which the first 32 are non-printable characters. if you are talking about doing something like NAD for 3 layers deep, with only 128 options per tier, then depending on what you are doing you ‘could’ run out of options.
http://www.asciitable.com/
I think, you need to read this : http://stackoverflow.com/questions/463786/what-is-an-easy-way-to-call-asc-and-chr-in-javascript-for-unicode-values.
I will consider more about your opinion.
Anyway, I also need to learn, how can I create Bubble plugin base on API functions from Webtask.io and how can I use the API plugin in my app. Could you help me?
I technically don’t need to read anything, but since you asked…
What the link you posted talks about is UniCode, what you asked about in your first post was ASCII these are two completely different things.
"I need a function to get a character from ASCII table LIKE this:
letter = CHAR (ascii_code_number)"
Not once did you mention using the UniCode character set through your posts above, only Ascii.
I am sorry, my english isn’t very good. I want to affirm that I allways respect you.