The character set in datasets

The character set used in data sets also plays a role in the storage of character strings. The conzept 16 character set, which was described in article “Der Zeichensatz in CONZEPT 16”, is also used here by default.


If data records are supposed to be stored in the database in a character set other than the conzept 16 character set, there are currently a few things to consider. In this article, I will use the UTF-8 character set as an example. This assumes that the dialog has been saved as a Unicode dialog.

When saving, the character string that is supposed to be set must be converted into the desired target character set. The input field cannot be linked directly to the database field via property wpDbFieldName for this purpose.

When saving, the content is transferred from the input object to the database field as follows:

// Write character string into the database field
faUniValue # StrCnv(StrCnv($edfaUniValue->wpCaption, _StrToUTF8),
                    _StrFromANSI);

To display the field content in the input field correctly again, the character string must be converted back in event A, for example. This is done with the following command sequence:

// Write string into input object
$edfaUniValue->wpCaption # StrCnv(StrCnv(faUniValue, _StrToANSI),
                                  _StrFromUTF8);

Similarly, the field in event EvtLstDataInit can be set as the column content of a RecList.

// Read data set
RecRead(tblUniUnicode, 0, _RecId, aID);
// Convert field from UTF-8
faUniValue # StrCnv(StrCnv(faUniValue, _StrToANSI), _StrFromUTF8);

The content cannot be used from property wpDbFieldName in label objects either. However, it is sufficient to assign the field content to property wpCaption of the label.
As the character string is currently not saved as UTF-8, only the first 256 characters of a character set can currently be used. The characters are displayed differently depending on the selected character set.

In future, the procedure will be simplified and Unicode will be supported directly.

Klicken Sie hier, um die Nutzungsbedingungen für unseren Blog zu lesen.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

Requests, questions or feedback are welcome:

Terms of use of the comment function in the blog

1. General information

Vectorsoft AG (‘Provider’) provides a public blog for Internet users (‘Users’) on the vectorsoft.de website. The public blog is intended for the exchange of information and ideas. Users who participate with contributions and comments undertake to comply with the blog terms of use and are responsible for the accuracy, appropriateness and freedom from legal infringements of their contributions. By using the comment function in our blog, you accept these terms of use.

2. Netiquette

We ask you to refrain from personal attacks and provocations based on other opinions. Please argue objectively and maintain a constructive discussion culture. Your comment should always be related to the topic in question in order to avoid digressions into other topics. Posting the same comment or several similar comments more than once is not permitted.

3. Prohibition of illegal content

By submitting your comment, you confirm that you are not violating any copyrights or other rights of third parties. Inciting, racist statements, instructions for criminal offences and their glorification, depictions of violence, pornographic content and statements that violate personal rights are prohibited.

4. No advertising

The use of the comment function is not permitted for commercial or party-political purposes. Advertising contributions of any kind will be deleted immediately.

5. Details of the name

When entering your name, pay attention to the principles mentioned above.

6. Source references

If you intend to publish quotes or contributions from third parties, please indicate the respective sources and explain how they relate to the blog post.

7. Violation of the terms of use

Posts that violate this policy will be deleted immediately. If you notice any violations yourself, please send us the link to the comment in question by e-mail to . We expressly point out that we will exclude individual users in the event of repeated or serious violations of these terms of use.

As of: Sept. 2024

Get your Trial Version now!

Test yeet free of charge

IHRE EVALUIERUNGSLIZENZ - JETZT ANFORDERN!

TESTEN SIE DIE CONZEPT 16 VOLLVERSION - UNVERBINDLICH und KOSTENFREI

Subscribe to our newsletter

[cleverreach_signup]
WordPress Cookie Notice by Real Cookie Banner