realbasic-plugins
[Top] [All Lists]

Re: Clarification needed: Accessing non-ASCII names in SDK

To: REALbasic Plugins <realbasic-plugins@lists.realsoftware.com>
Subject: Re: Clarification needed: Accessing non-ASCII names in SDK
From: Alfred Van Hoek <vanhoek@mac.com>
Date: Sun, 27 Dec 2009 15:33:26 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-plugins-bounces@lists.realsoftware.com) smtp.mail=realbasic-plugins-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <89fe53800912271207r2994310bge501b208ed8e8476@mail.gmail.com>
References: <89fe53800912271207r2994310bge501b208ed8e8476@mail.gmail.com>
Reply-to: REALbasic Plugins <realbasic-plugins@lists.realsoftware.com>
Sender: realbasic-plugins-bounces@lists.realsoftware.com

On Dec 27, 2009, at 3:07 PM, Thomas Tempelmann wrote:

I wonder what's up with this part of the Plugin SDK's documentation:

REALclassRef REALGetClassRef(const char *className);
className: the name of the class to retrieve. This parameter must be an ANSI string (not Unicode).

The part about "must be an ANSI string" bothers me. What is meant by
that, exactly, on the Mac?

I assume that ANSI here means the WinLatin1 encoding?

Let's assume a class is named "Cläss". Does that mean that even on the
Mac I have to convert this name to WinLatin1 to use REALGetClassRef?

That looks a unusual wrong to me.


It means one-byte-char-string as far as can be judged. Language parsers/lexers have difficulties in reading strings of chars with leading and trailing bytes. No UTF-8. UTF-16 might be a better encoding, but that requires all existing code and libraries doing syntax-coloring should change their underlying unsigned char to unsigned short strings. Has to do with finding the position between chars, avoiding t positioning within a two-byte char. Is like adding a single nucleotide into DNA, which is "3-char" coded. UTF-8 is even worse as you know...

Would this make sense?

A.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>