Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Steven Simpson Newsgroups: comp.lang.java.help Subject: Re: Actual width of unicode chracters. Date: Thu, 14 Jun 2012 08:06:47 +0100 Organization: Aioe.org NNTP Server Lines: 18 Message-ID: <75foa9-b46.ln1@s.simpson148.btinternet.com> References: NNTP-Posting-Host: BRsy76H8/rbuILniK+68WQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.help:1861 On 13/06/12 22:14, Lew wrote: > Young wrote: >> Thank you for the tries, I don't understand why I should use >> codePointCount() method. The length() method gives same result. I >> want to > Not in general it doesn't. > > Read the Javadocs for the two methods and you'll see why. I've just read it, and not seen any surprises - it doesn't seem to have anything to do with the OP's problem, counting spaces occupied by a character when displayed on a console. Whether a code point takes up two chars inside a program is unrelated to whether it takes up two display positions on a console. Am I missing something? -- ss at comp dot lancs dot ac dot uk