[gmpi] Re: GMPI req's draft 1 for review.

  • From: Steve Harris <S.W.Harris@xxxxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Tue, 7 Dec 2004 13:57:58 +0000

On Tue, Dec 07, 2004 at 01:45:57 +1300, Jeff McClintock wrote:
> HI,
> My point is, both Windows and Mac API use 16bit UNICODE.  If you pass my 
> plugin a 8bit string I've got to convert it, I've got to allocate memory 
> to hold the longer 16bit representation.  Then if I need to pass it back 
> I've got to convert it back to multibyte.

Actually windows uses UTF-16, and I'm pretty sure OSX uses UTF-8 nativly.

>   Handling UTF-8 multibyte characters is a big inefficient pain.  Some 
> characters are 8 bits, some are extended to multiple bytes.  Some 
> strings have mixtures of single-byte and multi-byte chracters  Any kind 
> of string manipulation is complicated by having to scan the string from 
> the beginning so as to avoid chopping a multi-byte character in two. 
> Novice programmers ignore the multi-byte characters and treat the string 
> as ASCII, leading to internationalization bugs.

I dont think you will need to do much manipulation of that kind.

>  I believe most programmers will find it easier to deal with 
> fixed-width strings using the ANSI wchar_t datatype.

Possibly, but I doubt it, the UNIX98 specification (later ISO/ANSI) for
the fw* functions is not that widly used, and the world seems to be
standardising on UTF-8. AFACR the Unicode people recommend UTF-8 as it
avoids endianess issues and is ASCII compatible.

- Steve

----------------------------------------------------------------------
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: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: