[haiku-commits] Re: haiku: hrev45988 - src/kits/interface headers

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Sun, 25 Aug 2013 20:26:57 -0400

On Sun, Aug 25, 2013 at 7:52 PM, John Scipione <jscipione@xxxxxxxxx> wrote:
> On Sun, Aug 25, 2013 at 7:30 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
>>
>> On Aug 25, 2013 5:28 PM, "John Scipione" <jscipione@xxxxxxxxx> wrote:
>>> This might not be likely but in the interest of defensive programming I
>>> wanted to prevent the problem from being able to present itself.
>>>
>>> Am I being too cautious?
>>
>> Yes. A multibyte constant will always have the high bit set on the first
>> byte, so that can't in fact happen.
>
> Will a multibyte constant always have the high bit set on the first
> byte for every multibyte encoding or just UTF-8? While a view is
> normally set to use UTF-8, the view's encoding can be changed by
> SetFont() using the B_FONT_ENCODING flag.

Did some checking and it appears that all of the other character
encodings available to be set to a view besides UTF-8 are single-byte
"high-ASCII" encodings such as Latin-1.

I've reverted the commits in hrev45989. Thanks for pointing out my
mistake Axel and Rene. I guess this means owe Haiku, Inc. $10 now. :/

Other related posts: