[image of digits] Embarcadero C++ Builder - Text & Web Applications

The ASCII 128-character set requires only 7-bits per character (less than an 8-bit byte).

Unicode currently supports 120,737 characters (June 2015)
Some Font Charactersets will not work with Unicode: e.g. SYMBOL!


The Unicode Basic Multilingual Plane 0 (or BMP) supports 65,535-characters and requires 16-bits,
or two bytes per character, with characters numbered from hexadecimal 0000 to FFFD.

To place the Basic Multilingual Plane coffee-cup glyph and the word "Coffee" in an edit box, write:
Form1->Edit1->Text = L"\u26FE Coffee";


The Unicode Supplementary Planes 1-16 support another 55,202 characters and requires 32-bits,
or four bytes per character, with characters numbered from hexadecimal mmmmm to E01EF.

Unicode Code Charts:

Codepoint: Characters Complete with Codes
some can be selected, copied and pasted

To place the Supplementary Plane rocket glyph and the word "Rocket" in an edit box, write:
Form1->Edit1->Text = L"\U0001F66D Rocket";

To place a different rocket glyph and the word "Rocket" in an edit box, write:
Form1->Edit1->Text = L"\U0001F680 Rocket";

Wikipedia: Code Point Planes and Blocks
some can be selected, copied and pasted

Unicode Consortium characters:
none can be selected, copied and pasted
groups: scripts, alphabets, symbols, icons, pictographs, signs and shapes

codes: hex0000 - hexE01EF (2377 pages)
descriptive names

XE6 Unicode Example
Version 3 October 2015

An introduction to using UnicodeString variables.

"100,000,000,000,000 Poems" by Raymond Queneau.
Revised 2/20/2011 by Nicholas Gessler.
A randomly created sonnet along the lines of heads-bodies-legs cut flip-books.
Page numbers from which the lines were taken are shown in ghosted grey.

Oulipo Links:

Source:
From OULIPO COMPENDIUM - ATLAS ARKHIVE SIX - DOCUMENTS OF THE AVANT-GARD compiled by Harry Mathews & Alastair Brotchie. Atlas Press, London (1998) pages 14-33).
Amazon.com

Clarisse Lispector's Poem
Original reversible sonnet in Portuguese by Clarisse Lispector. Visualized by Adriana de Souza e Silva. Revised by N. Gessler 2/21/2011.

Clarisse Lispector's Poem
Original reversible sonnet in Portuguese by Clarisse Lispector. Visualized by Adriana de Souza e Silva.

Sonnet
A randomly created sonnet in the style of heads-bodies-legs flip books.

Oulipo Links:

Source
"100,000,000,000,000 Poems" by Raymond Queneau. In OULIPO COMPENDIUM - ATLAS ARKHIVE SIX - DOCUMENTS OF THE AVANT-GARD compiled by Harry Mathews & Alastair Brotchie. Atlas Press, London (1998) pages 14-33).
Amazon.com

Rolling a Pair of Dice

A simple challenge to simulate the roll of a pair of dice provides the opportunity to exercise some of the AnsiString capabilities of the Visual Component Library. Invoked are the Caption, TextOut, Text and Lines properties as well as string concatenation. Images of each of the two dice appear after each roll. A voice gives the sum of the two dice using a suite of number .wav files imported into the application.

The Web Component used in the examples below is not compatible with Borland Studio 2006.
Some modification will be required...

Tristram - An AnsiString Class Demonstration

This application imports the one megabyte novel TRISTRAM SHANDY and executes a key-word-in-context search on the text.

A Recursive Babel Fish Translator

Still a bit buggy. It needs more code to detect errors. Work needs to be done to trap the variety of errors resulting from complex sentences. The "Go" portion of the application requires you to choose a pair of languages. If you don't, the app will crash. The "Lost in Translation" portion of the application will translate your text through several languages and back to English. Try using short, single-line sentences. Currently, the translations are to Italian, German, French, Spanish and back to English (perhaps not in that order).
These short sentences produce interesting results:

When do you want to go there?
Don't you love me any more?
We must move forward with great vigor.
Life, liberty and the pursuit of happiness.
Liberty, equality and fraternity.
A stitch in time saves nine.
And the signifieds butt heads with the signifiers.
Have you used it much?
Peaches float in mercury.
The sun rises at the break of dawn.

An Experiment to Discover How to Talk to Babel Fish Translator

The textToTranslate is submitted to Babel Fish through the "GET Method," commands appended to the URL after the question mark "?".
The Post method should also work but I have not explored it successfully.
Both the textToTranslate and the translatedText are recovered from the body of the returned HTML document.

I first ran an experiment to see where, in the body of the HTML document, the textToTranslate and translatedText are located.
On their website, I entered "cryptology" and requested a translation to German. I then viewed the HTML source and searched it for those two words (see the highlighted screen-shot below). This information provides key target strings to look for from which to measure the offset and length of the textToTranslate and translatedText.

I then modified the NMHTTP1 component demonstration code to submit the word "cryptology" and find it and its translation in the returned HTML document. That demonstration is what you see in 3/4 of the application illustrated above. It allows you to submit the default GET command or to modify it by hand.

The bottom-right 1/4 of the screen, the light blue GroupBox, is a demonstration of a generalized function which will submit words or sentences to Babel Fish and receive their translations. It is set to translate English-to-German (the code "lp=en_de"). This little demonstration should enable you to write more elaborate, "lost-in-translation"-type software...

The next step will be to search for identifying strings which precede both the text-to-translate and the translated-text. The text-to-translate is always preceded by the same string. However, the translated-text may be preceded by several different strings. This will require some experimentation.

The language codes in the form of "lp=en_de" are listed below:

zh_en = Chinese-simp to English
zt_en = Chinese-trad to English
en_zh = English to Chinese-simp
en_zt = English to Chinese-trad
en_nl = English to Dutch
en_fr = English to French
en_de = English to German
en_el = English to Greek
en_it = English to Italian
en_ja = English to Japanese
en_ko = English to Korean
en_pt = English to Portuguese
en_ru = English to Russian
en_es = English to Spanish
nl_en = Dutch to English
nl_fr = Dutch to French
fr_en = French to English
fr_de = French to German
fr_el = French to Greek
fr_it = French to Italian
fr_pt = French to Portuguese
fr_nl = French to Dutch
fr_es = French to Spanish
de_en = German to English
de_fr = German to French
el_en = Greek to English
el_fr = Greek to French
it_en = Italian to English
it_fr = Italian to French
ja_en = Japanese to English
ko_en = Korean to English
pt_en = Portuguese to English
pt_fr = Portuguese to French
ru_en = Russian to English
es_en = Spanish to English
es_fr = Spanish to French

KeyDown, KeyPress and KeyUp Events
This application allows you to experiment with the behavior of the KeyDown, KeyPress and KeyUp events as well the behaviors of the keys and Edit boxes.

"Key" in the KeyPress event handler is a character and will distinguish shifted from unshifted keys.

"Key" in the KeyDown and KeyUp event handlers is an integer and provides the key number without any direct information on the shift state. However, when the "Key" resulting from KeyDown is displayed in an Edit box, it displays both the shift-differentiated character and the shift-undifferentiated key. This does not happen when the "Key" resulting from KeyUp is displayed in an Edit box. Strange indeed...

Web Harvest - FastNet
This application was built from the code used in the application below. It imports the body of a Website into an AnsiString variable and then uses AnsiString methods to search for specific information. The general purpose routine (tan background) allows searching the larger text. The special purpose
routine (gold background) seeks out CMI's Gold & Silver Spot Prices and extracts the current price of gold. That extraction procedes in two stages: the first to identify diagnostic text which appears close to the price; the second to find the price by searching a smaller subtext for the dollar sign "$." (The NMHTTP1 event handlers can be omitted - see the code of the application directly below.)

Borland's FastNet Component Example
This application accompanies Borland C++ Builder 6 and demonstrates how your application can access the HTML content on a Website. It will need to be modified to suit your programming needs, but everything you need is in there. You will have to compose your own interface and program your own text processing in order to extract and deal with the information that you want.

Jacquard
An example of a timed presentation of text and graphics resembling an automatic PowerPoint application.

Bugs
The moving image flickers, a problem which can be eliminated by using alternative coding techniques. Below are some hints on how to fix the flicker received from the on-line help from other programmers:

Falling Text
An example of moving text across the screen. "Disintegration" enables individual letters to fall at random accelerating to the bottom of the Window by the force of gravity. It is inspired by Rob Jagnow's "The Disintegrating Internet Infrastructure" which was once posted on Web.