<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
On 09/20/2010 12:11 PM, Peter Hunter wrote:
<blockquote
cite="mid:99EC3972E1839C47BFA20DD7867376C6D12BB252F7@mbx-au.mediacommand.net"
type="cite">
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cordia New";
panose-1:2 11 3 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cordia New";
panose-1:2 11 3 4 2 2 2 2 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">I happened to come across the same issue<o:p></o:p></p>
<p class="MsoNormal">Seems to me that the return value for isLetter
(and IsMark)
is incorrectly determined<o:p></o:p></p>
<p class="MsoNormal">i.e.<o:p></o:p></p>
<p class="MsoNormal">static HB_Bool isLetter(HB_UChar16 ucs)<o:p></o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> const int test =
FLAG(HB_Letter_Uppercase) |<o:p></o:p></p>
<p class="MsoNormal">
FLAG(HB_Letter_Lowercase) |<o:p></o:p></p>
<p class="MsoNormal">
FLAG(HB_Letter_Titlecase) |<o:p></o:p></p>
<p class="MsoNormal">
FLAG(HB_Letter_Modifier) |<o:p></o:p></p>
<p class="MsoNormal">
FLAG(HB_Letter_Other);<o:p></o:p></p>
<p class="MsoNormal"> return FLAG(HB_GetUnicodeCharCategory(ucs))
& test;<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The return value is a HB_BOOL (which is a byte)
whereas the computed
mask value for everything other than HB_Letter_Other is greater than
256.<o:p></o:p></p>
<p class="MsoNormal">A more appropriate return value would be<o:p></o:p></p>
<p class="MsoNormal"> return (FLAG(HB_GetUnicodeCharCategory(ucs))
& test) != 0;</p>
</div>
</blockquote>
<br>
Aha, applying this, gives correct output to me.<br>
<br>
Thanks,<br>
Pravin S<br>
</body>
</html>