Sep
05
|
By casting the integer ASCII value to a char.
int asciiValue = 65; char ch = (char) asciiValue;
One Ping to “How do I convert an ASCII value to a character?”
Array ( [0] => WP_Comment Object ( [comment_ID] => 61 [comment_post_ID] => 93 [comment_author] => How to convert a hex string to an ASCII character? | web development helpdesk [comment_author_email] => [comment_author_url] => https://helpdesk.objects.com.au/java/how-to-convert-a-hex-string-to-an-ascii-character [comment_author_IP] => 125.214.65.236 [comment_date] => 2009-05-05 02:01:10 [comment_date_gmt] => 2009-05-05 02:01:10 [comment_content] => [...] If you have a hex value as a string and you need the ASCII character that corresponds to that value then you need to parse your string to get its value. Once you have its value it is a simple cast to convert it to an ASCII character [...] [comment_karma] => 0 [comment_approved] => 1 [comment_agent] => Incutio XML-RPC -- WordPress/2.6.5 [comment_type] => pingback [comment_parent] => 0 [user_id] => 0 [children:protected] => Array ( ) [populated_children:protected] => 1 [post_fields:protected] => Array ( [0] => post_author [1] => post_date [2] => post_date_gmt [3] => post_content [4] => post_title [5] => post_excerpt [6] => post_status [7] => comment_status [8] => ping_status [9] => post_name [10] => to_ping [11] => pinged [12] => post_modified [13] => post_modified_gmt [14] => post_content_filtered [15] => post_parent [16] => guid [17] => menu_order [18] => post_type [19] => post_mime_type [20] => comment_count ) ) ) 2 Responses to “How do I convert an ASCII value to a character?”
-
kirubakaran Says:
November 2nd, 2011 at 1:04 amits use full for me and its working fine.
Leave a Reply
You must be logged in to post a comment.
May 5th, 2009 at 2:01 am
[…] If you have a hex value as a string and you need the ASCII character that corresponds to that value then you need to parse your string to get its value. Once you have its value it is a simple cast to convert it to an ASCII character […]