Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe05.iad.POSTED!6b61fb94!not-for-mail From: Knute Johnson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: char to decimal References: <92ea64F3avU1@mid.individual.net> In-Reply-To: <92ea64F3avU1@mid.individual.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 15 Message-ID: X-Complaints-To: abuse@newsdemon.com NNTP-Posting-Date: Thu, 05 May 2011 00:49:50 UTC Organization: NewsDemon Date: Wed, 04 May 2011 17:49:52 -0700 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3527 On 5/4/2011 5:43 PM, Dirk Bruere at NeoPax wrote: > IU need to take a char in UTF-8 and convert it to an ascii int (decimal) > > eg "a" = 97 > > which is then converted to the string "97" > Is there a simple way to do this? > You can cast it to a short. -- Knute Johnson s/knute/nospam/