Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the correct way to test Unicode support in a Smalltalk implementation?

Given any Smalltalk flavor, how should I proceed to check if Unicode is supported? In case of not having support, how can I detect at which level is missing (VM, font, Converter, etc)?

like image 536
user869097 Avatar asked Jul 30 '11 21:07

user869097


2 Answers

At the VM level you can try Character codePoint: 256 or Character codePoint: 65536 (some Smalltalks may use value: instead of codePoint: still). Converter APIs differ between dialects too, but chances are that if the VM supports Unicode so will the converters.

As far as I know, no Smalltalk fully supports Unicode algorithms (case-folding, character properties, etc.), but some may support bidirectional text. For example GNU Smalltalk gets that from free from GTK+ and Pango.

like image 142
Paolo Bonzini Avatar answered Oct 25 '22 01:10

Paolo Bonzini


I presume you mean to check manually for a particular flavor or flavors you intend to use, because I don't think there's any automated way. Two things spring to mind. First, read the documentation. Second, try typing some text with arbitrary unicode characters into a window and see if they display. If they do, you're fine. If they don't, then it's an interesting question whether the problem might be with input, fonts available on a particular platform, basic ability to represent the characters, or something else. You could also try looking up the APIs for working with particular encodings (Supports Unicode is a rather vague term) and try reading and writing a file containing some of these characters. Or you could ask somebody if the particular flavor you're interested in supports the particular features you want to use.

For VisualWorks the answer is probably yes, but it will depend on exactly what it is you want to do. For example, characters from right-to-left languages can be displayed, but text editing with them is not going to work very well.

like image 4
Alan Knight Avatar answered Oct 24 '22 23:10

Alan Knight