There is no any direct method exist to convert the ASCII to character. If you want to convert the ASCII to character you will have to create a map in which assign the ASCII value to the key value and the character to the value of the value.
For example
Map<Integer, String> ASCIIMap = new Map<Integer, String> ();
ASCIIMap.put(65,'A');
ASCIIMap.put(66,'B');
ASCIIMap.put(67,'C');
For the alternative you can use the JavaScript method on the VF page to convert the ASCII to Character.
My Problem is I want to make a vf page same as contact detail page on which all alphabets
should be there. But i dont want to add alphabets in list 1 by 1. As you mentioned solution by map
In this also i have to make entry one by one. so i want to change ascii values to characters by which i can optimize my code. plz give me idea of that..................
Hi,
There is no any direct method exist to convert the ASCII to character. If you want to convert the ASCII to character you will have to create a map in which assign the ASCII value to the key value and the character to the value of the value.
For example
Map<Integer, String> ASCIIMap = new Map<Integer, String> ();
ASCIIMap.put(65,'A');
ASCIIMap.put(66,'B');
ASCIIMap.put(67,'C');
For the alternative you can use the JavaScript method on the VF page to convert the ASCII to Character.
For this follow the below link
http://salesforce-narasimha.blogspot.com/2011/09/retrive-ascii-code-for-character.html
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hello S jain,
My Problem is I want to make a vf page same as contact detail page on which all alphabets
should be there. But i dont want to add alphabets in list 1 by 1. As you mentioned solution by map
In this also i have to make entry one by one. so i want to change ascii values to characters by which i can optimize my code. plz give me idea of that..................
Hi,
You can append the JavaScript between the lists where you want to put the field value. For the reference use below code
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.