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

Given any shade of Smalltalk, how should I check if Unicode is supported? In the absence of support, how can I determine at what level is missing (VM, font, converter, etc.)?

+6
source share
2 answers

At VM level, you can try Character codePoint: 256 or Character codePoint: 65536 (some Smalltalks may use value: instead of codePoint: . Converter APIs also differ between dialects, but most likely, if the VM supports Unicode, then there will be converters.

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

+5
source

I assume that you want to check manually for a specific taste or tastes that you intend to use, because I do not think there is an automated way. Two things spring. Read the documentation first. Secondly, try entering text into text with arbitrary Unicode characters in the window and see if they are displayed. If they do, it's all right. If they do not, then the interesting question is whether the problem can be related to input, fonts available on a particular platform, the basic ability to represent characters, or something else. You can also try to find an API to work with certain encodings (Unicode support is a rather vague term) and try to read and write a file containing some of these characters. Or you could ask someone if a particular taste that interests you supports the specific functions that you want to use.

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

+4
source

Source: https://habr.com/ru/post/893965/


All Articles