I wonder how SQLite does this under the covers. They mapped different data types to storage classes. As I understand, things like e. g. varchar are an internal alias to "text". But then, SQLite doesn't bring with it a
Taking in account other DBMS, for example mysql, if you use unicode UTF8 fields, by default now it allocates 4 bytes "per character" (it allocates the maximum possible).
Regarding IBMi I think it has - historically - the correct approach, "more correct" than other platforms, because it has explicit CCSID attached to a piece of information.
A char buffer in RPG has-a CCSID. A prototype parameter has-a CCSID. A stream file on IFS has-a CCSID. A field in the db has-a CCSID. You don't guess like in other platforms and the conversion points are well defined if respected.
RPG has now support for unicode (i.e. substring in "natural" mode etc.).
To use richer services over unicode, like i.e. "remove all accents in a string", or translitarations, you call into ICU API (in QICU library on IBMi ... despite IBM should really take time to refresh it, the last mod dates I see on the SRVPGM on my system are 2009... cmon IBM.... refresh those C/C++ compilers....).
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.