Ruby, Unicode and Tcl

Apparently Tim Bray gave a talk at RubyConf about “RubyConf: I18n, M17n, Unicode, and all that”, which discussed the approaches other languages take. It’s a pity that Tcl wasn’t mentioned, as it basically gets things right. It is fully unicode aware, and generally “just works”, because all strings are unicode strings, by default – there isn’t a separate syntax, or commands to create and manipulate multibyte strings and characters.

% set c u0065
% string bytelength $c
% string length $c

% set c u2022
% string bytelength $c
% string length $c

That works for regular expressions, too.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s