Forum OpenACS Development: Improved suport for multi-byte emoticons in OpenACS

Dear all,

This is an announcement of forthcoming releases. The newest versions of NaviServer and the nsdb drivers support now emoticons with up to 4 bytes representations in UTF-8 (when used with Tcl 8.6; Tcl 8.7 extends the support further, but requires a compile option). To support these multibyte emoticons in OpenACS it was necessary to adapt the DB interfaces to convert raw Tcl values to external UTF-8. Without these changes, PostgreSQL complains about invalid UTF-8 characters.

With these changes, one can use these multibyte emoticons in SQL queries

    db_0or1row ... {select 1 from cr_items where name = '😈'}
or use it as values of bind variables
    set x 😈
    db_0or1row ... {select 1 from cr_items where name = :x}
... but not as names of bind variables ("x" in the example above. Bind variable names have the same restricted syntax as before, starting with a character or underscore, no funny characters in the name).

To test this, one has to get the tip versions of NaviServer and nsdbg from Bitbucket. These changes will be included in the forthcoming release of NaviServer.

The code is already running at openacs.org since about one week.

all the best
-gn