[gmpi] Re: string encoding in teh API (UTFs)
- From: thockin@xxxxxxxxxx
- To: gmpi@xxxxxxxxxxxxx
- Date: Mon, 19 Dec 2005 22:25:03 -0800
On Fri, Dec 16, 2005 at 09:54:27AM +1300, Jeff McClintock wrote:
> >... We have to pass strings between objects from
> >different compilers as well as possibly across networks.
>
> Both Windows and OS-X SDKs require consistent byte-ordering and
> character width in strings.
>
> A large number of compilers target Windows or Mac, (including GNU). So
> which compilers have a problem?
Quoted from the Apple Developer Connection:
Important: Although wchar_t and wstring are standards, they are
somewhat vaguely defined and ambiguous ones. Mac OS X provides far
better support for Wide and Unicode characters through the
CFString APIs. Apple strongly recommends using these APIs on Mac
OS X, as almost all other Mac OS X frameworks expect wide
character strings to be in this format, and none support wchar_t
and wstring.
> The Mozilla browser, Über cross-platform. Source code and internal
> interfaces use wide-chars.
So on UNIX platforms, including MacOS X, they use 32 bit characters.
> Still, if the group is happy with UTF-8, it's fine with me.
We have 2 options.
We can go with UTF-8. Translated strings can be cross-platform and
transparent. ASCII just works. There is standards support, string
literal support and full library support.
or
We can go with wchar_t. The actual encoding depends on the platform
(UTF-16 or UTF-32). Strings files need to be converted from <whatever> to
the native wchar_t before they come out of a plugin. There is standards
support, de facto string-literal support (L"string") and full library
support.
I think UTF-8 is the best option. Given how little of what we do will be
string manipulation, and how little anyone but you and I seem to care,
let's agree to go with UTF-8 for now, until and unless we find a great
reason to do UTF-16.
Deal?
Tim
----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules: Please stay on topic. You are responsible for your own
words. Please respect your fellow subscribers. Please do not
redistribute anyone else's words without their permission.
Archive: http://www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe
- Follow-Ups:
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- References:
- [gmpi] Re: Querying a plugin's structure (params, IOs, etc)
- From: thockin
- [gmpi] Re: Querying a plugin's structure (params, IOs, etc)
- From: Jeff McClintock
- [gmpi] string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
Other related posts:
- » [gmpi] string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- » [gmpi] Re: string encoding in teh API (UTFs)
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: Querying a plugin's structure (params, IOs, etc)
- From: thockin
- [gmpi] Re: Querying a plugin's structure (params, IOs, etc)
- From: Jeff McClintock
- [gmpi] string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock
- [gmpi] Re: string encoding in teh API (UTFs)
- From: thockin
- [gmpi] Re: string encoding in teh API (UTFs)
- From: Jeff McClintock