Hi Ben,
No it shouldn't be difficult. The more difficult thing for me right
now is to find the time.
It's of course already done for text drawing and cut-and-paste in
redisplay-carbon.c and select-carbon.c. The coding system used on Mac
OS X is Qcarbon_unicode, defined in intl-carbon.c. The macro
TO_EXTERNAL_FORMAT was used for external encoding (is that OK?).
Some places that need changes are menus, font names, toolbar help text,
and frame titles. Again I don't think this is hard to do. I'll
probably write a function or macro that uses
NEW_LISP_STRING_TO_EXTERNAL to convert Lisp_String to CFStringRef (OS
X's unicode string representation).
Andrew.
On Feb 21, 2005, at 4:22 PM, Ben Wing wrote:
Andrew -- I took a look at your code and it should not be difficult
to
make
the strings work correctly with internationalized text. Basically,
you just
need to figure out what encoding of text the external API's expect and
then
call the appropriate conversion functions. For example, if the API's
expect
UTF-8, then some variation of replacing XSTRING_DATA (string) with
NEW_LISP_STRING_TO_EXTERNAL (string, Qutf8) should do the trick. This
returns a string in alloca() space so there is no need to free it.
(The GTK
code doesn't always do this currently but there is a pending patch
among my
workspaces to fix this.)
ben