USTRING — Unicode that feels like Clarion (v2)

Clarion · Unicode Preview (v2)

USTRING — Unicode that feels like Clarion

Wide text end to end: declare it, type it, store it, browse it. No new programming model. No special “Unicode mode.” If you already know CSTRING, you already know USTRING — and your existing ANSI apps stay byte-identical.

SQL MSSQL · ODBC · PostgreSQL · SQLite ISAM TopSpeedW · ASCII · BASIC · DOS UI ENTRY · TEXT · COMBO · captions · blobs · reports

A few highlights for Clarion developers evaluating this build — then the full tester guide (declaration rules, import maps, backends, recipes, what to poke at).

Hands-off by design

Pick USTRING in the DCT, USE it on a control, PUT it to SQL. No conversion buffers, no “wide mode” flag, no per-screen ceremony. It just works the way Clarion always did.

Σ

All SQL backends speak Unicode

MSSQL, ODBC, PostgreSQL, and SQLite: USTRING(n) ↔ NVARCHAR(n-1) (logical length round-trips). Keys, GET, SET/NEXT, and bound WHERE values stay wide — never narrowed literals.

TopSpeed goes wide

Classic TPS is untouched. New driver: DRIVER('TopSpeedW'), .tpsw files, USTRING fields + UNICODE blobs, keys that work, and clean version rejects instead of silent mojibake. TopSpeedW files use the new 512 GB big file format — the classic 2 GB limit is now a guarded error, never a corrupted file, and SEND('BIGFILE=ON') upgrades an adopted classic file in place.

Text drivers now do 4 GB

ASCII, BASIC and DOS files work to 4 GB in shared and exclusive modes. Before: shared files quietly died at 2 GB with a false “Access Denied”, and growing past 4 GB silently overwrote the start of the file. Now the limit is a clean, reported error — a full file is an error, not a corrupted file.

A blob is a field

On SQL there is no MEMO(n) — long text is the blob. TEXT,USE(blob) displays and edits; IMAGE,USE(blob) displays. Window binding ships today; Report is the same mental model (next surface).

Ω

Reports print wide

Add UNICODE to a REPORT and wide text prints end to end — preview, print-after-preview, direct print — and emoji print in color, composing over colored bands. A report left un-opted posts a loud error 546 on wide data — never silent mojibake.

Type your language — everywhere

Source (UTF-8 / UTF-16), Window/Report designers, DCT messages/tips, IME, emoji panel, clipboard. Captions and free-form ENTRY/TEXT/COMBO carry exact UTF-16 on any system codepage.

ANSI apps stay byte-identical

No USTRING? No wide designer text? Rebuild and ship — same binary behavior as before. Opt-in tokens (e.g. PostgreSQL UNICODECONNECT=1) never change default connects.

Import maps that tell the truth

Import Tables: nvarchar → USTRING, ntext / nvarchar(max) → UNICODE memo/blob, binary max → BINARY blob — attributes already ticked. Data Browser edits wide without narrowing.

Surrogate-safe editing

Emoji and non-BMP text edit as atomic characters on wide ENTRY/COMBO. Color emoji via DirectWrite where available; ordinary edits never leave half a pair behind.

Full tester guide — mental model, conversion rules, DCT import table, screen controls, reports, blobs, SQL / SQLite / text drivers / TopSpeedW, recipes, and what to focus on when testing.

Open the full Unicode Tester Guide

Report tool authors — preview replacements, export targets, or anything that reads page files: when a report opts into UNICODE, pages are .emf instead of .wmf. Transition paths, format detection, and the generator-interface roadmap:

EMF Page Files — Transition Note

Standalone pages (best full-width). Everything described there is implemented unless marked as a known limitation — different behavior is exactly what we want to hear about.

Leave a Reply