Xojo Conferences

RB's unicode new features (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: UTF32 encoding??
Next thread: Re: Correct wat to Draw strings

Re: Plugins website   -   Troy A. Dix
  RB's unicode new features   -   Theodore H. Smith
   Re: RB's unicode new features   -   Joseph J. Strout

RB's unicode new features
Date: 06.06.02 21:55 (Thu, 6 Jun 2002 22:55:51 +0200)
From: Theodore H. Smith
I was reminded by the numbers I saw in RB's plugin API reference,
of this in CFString.h:

enum CFStringBuiltInEncodings {
kCFStringEncodingInvalidId = (long)0xFFFFFFFF,
kCFStringEncodingMacRoman = 0,
kCFStringEncodingWindowsLatin1 = 0x0500, /* ANSI codepage 1252 */
kCFStringEncodingISOLatin1 = 0x0201, /* ISO 8859-1 */
kCFStringEncodingNextStepLatin = 0x0B01, /* NextStep encoding*/
kCFStringEncodingASCII = 0x0600, /* 0..127 (in creating
CFString, values greater than 0x7F are treated as corresponding
Unicode value) */
kCFStringEncodingUnicode = 0x0100, /*
kTextEncodingUnicodeDefault + kTextEncodingDefaultFormat (aka
kUnicode16BitFormat) */
kCFStringEncodingUTF8 = 0x08000100, /*
kTextEncodingUnicodeDefault + kUnicodeUTF8Format */
kCFStringEncodingNonLossyASCII = 0x0BFF /* 7bit Unicode
variants used by YellowBox & Java */

I see where RB's "Unicode" misnaming might have come from. I realised
this after I made the post, so sorry about that! Although it does
say (aka kUnicode16BitFormat).

Anyhow, what I noticed was, that invalid is FFFFFFFF, not FFFF like
RB API ref claims!

Time to update the docs?? Or I'm guessing too much?

I'm so pleased with Get and Set string encoding! But we need more.
As other plugin authors here have recently talked about.

Re: RB's unicode new features
Date: 07.06.02 04:26 (Thu, 6 Jun 2002 20:26:35 -0700)
From: Joseph J. Strout
At 10:55 PM +0200 6/6/02, Theodore H. Smith wrote:

>Anyhow, what I noticed was, that invalid is FFFFFFFF, not FFFF like
>RB API ref claims!
>Time to update the docs?? Or I'm guessing too much?

You're guessing too much. We use 0xFFFF to mean invalid; this is
kTextEncodingUnknown, defined in TextCommon.h. (CFStringEncodings
are equivalent to TextEncodings in most cases, but not that one.)

- Joe