Official Content

GeneXus Knowledge Bases can have many languages but only one will be the default. It is specified in the Knowledge Base Kb Language property.

Every text inserted in the Knowledge Base objects (objects descriptions, attributes descriptions, string inserted in events and rules codes, etc.) will be considered to be in this language. If the Kb Language value is Spanish and you have this line TextBlock.Caption = "日本語" (Japanese language) in an object events code, the "日本語" literal will be taken as a Spanish literal.

GeneXus Knowledge Bases are stored in a SQL Server database and saves the default language literals in this database tables, so we need to consider setting the appropriate collation in the KB database in order to support the default language characters.

The collation to a new Knowledge Base database can be set when creating it. This is very important because the database collation cannot be changed after the database is created.

Examples

Some known collations are:

English (US) SQL_Latin1_General_CP1_CI_AS
Japanese Japanese_CI_AS
Chinese (PRC) Chinese_PRC_CI_AS
Arabic Arabic_CI_AS
Spanish Modern_Spanish_CI_AS

English (non US)
Portuguese
Italian

Latin1_General_CI_AS

Warning: Always use CI (Case Insensitive) and AS (Accent Sensitive) when selecting your Collation..

For more detail check SQL Server Collation Settings.

Application Database

The same issue happens if you use SQLServer for prototyping your application, make sure to use the correct collation configuration. You can manually create the database with the desired collation as follows:

CREATE DATABASE [DatabaseName]
COLLATE <InsertCorrectCollationHere>
GO

Then, use Create Database command to create the tables.

Troubleshooting

Question Marks ??????? or funny characters is displayed on the generated application

An application is executed and question marks are displayed instead of the correct characters. It could be on the application labels or database values.

image_2019218133710_1_png

This is a hint there is a problem with the KB Database collation or the Application database collation or UTF encoding. Review the case based on this article; once the correct collation is configured characters are correctly seen:

image_2019218133839_1_png

The SQL Server instance 'Localhost\SQLEXPRESS' chosen for the Knowledge Base storage does not support the collation 'Latin1_General_100_CI_AS_SC_UTF8' required to create the Knowledge Base. (Details)

The following error appears when creating a KB from gxserver.

error: The SQL Server instance 'Localhost\SQLEXPRESS' chosen for the Knowledge Base storage does not support the collation 'Latin1_General_100_CI_AS_SC_UTF8' required to create the Knowledge Base. (Details)
Failed: Create Knowledge Base

The default database collation is Latin1_General_100_CI_AS_SC_UTF8 when using SQLServer 2019/LocalDB 15 or higher since GeneXus 17 Upgrade 8. You need to install an equivalent version locally to download the KB (SAC#50653).

See Also

Working with Collations
Collation and International Terminology
International Considerations for Databases and Database Engine Applications


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant