[gmpi] Re: string encoding in teh API (UTFs)

  • From: Jeff McClintock <jeffmcc@xxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Wed, 14 Dec 2005 21:38:12 +1300

As best I can tell, Windows and Mac both use UTF-16.

Linux and most UNIXes, by and large, use UTF-8.

UTF-8, on the other hand, is more efficient for English and European
languages, has no byte ordering problems, and is safe for existing ASCII
systems.  It also is the standard format for XML and the web.

I understand as a Linux programmer you prefer UTF-8.

I'm just saying, for me, wide-chars are easier. Fixed-size ones. I guess that would be UCS-16 on Windows.

It's because both my host and my plugins use wide-chars for GUI and accessing the file system, My host GUI is switchable to Chinese, Japanese etc so I get no efficiency from using only English strings.

Mostly it seems a waste for both plugin and host to use 16-bit, but to double-convert each string to UTF-8 and back as it crosses the GMPI API.

I already support Windows-98 ( ASCII ) and Windows-XP from the same source code, by using the macro TCHAR to represent either "char" or "wchar_t".
I'm not sure why you're against this, considering on Linux you will only ever use TCHAR=char and will therefore not be affected by it.

Best regards,

---------------------------------------------------------------------- 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: