AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones multilingües
  • Overview
  • Defining the character set of a data file
  • Defining the character set used by a data file
  • Notes and limitations
  • Example: Creating a data file in Hebrew
  • Changing the character set of a data file
  • Modifying the character set used for the searches and for the sorts
  • Finding out the character set of a data file
  • How to?
  • Example: Changing the fonts according to the character set of the data file read
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Overview
When an application displays or saves data in HFSQL data files, this data is typed in the current language.
If the application is used in a country that uses a Latin character set, no specific configuration is required.
If the application is used in a country that uses a specific character set, this character set must also be supported by the data files. Therefore, most of the operations (searches, sorts, ...) will be performed according to the selected character set.
Defining the character set of a data file

Defining the character set used by a data file

To define the character set used by a data file:
  1. Define the character set with ChangeCharset.
  2. Create the data file with HCreation (or HCreationIfNotFound). In these functions, use the hChangeCharset constant to take into account the character set specified by ChangeCharset.
All the functions used to perform sorts and searches will use the specific features of the selected character set.

Notes and limitations

  • The size of string items specified in the analysis is expressed in bytes and not in characters. Depending on the character set used, you may have to increase the item size (if the characters used are coded on 2 bytes for example).
  • The character set of the data file must always be identical to the character set specified by ChangeCharset. Otherwise, when accessing a string index (string, character, date, time):
    • Reading and searching for a record: no error will be displayed. However, the data read will not correspond to the expected data.
    • Modifying a record (addition, modification, deletion of records or crossed records): a WLanguage error will be displayed.
  • No query with joins can be performed on text items that use different character sets.
  • The sort order in HFSQL indexes ignores double letters (e.g., "CH" in Spanish or "LJ" in Croatian).
  • HFSQL Client/Server In HFSQL Client/Server, only the sort order for the following languages is managed: French, Arabic, Chinese, Korean, Estonian, Greek, Hebrew, Japanese, Polish, Russian, Thai, Turkish and Vietnamese.

Example: Creating a data file in Hebrew

// Language used in the application: Hebrew
Nation(nationHebrew)
// Change the character set
ChangeCharset(charsetHebrew)
// Create the data file 
// and take the change of character set into account
HCreation(Azaa, "", "", "", hChangeCharset)
// Enter a record
Azaa.toto = "ñéâëðéçìòëðâëêðéò"
HAdd(Azaa)
Changing the character set of a data file
In some cases, you may want to change the character set of a data file without recreating this file. For example:
  • a data file was translated.
  • a data file is filled when installing an application with the data corresponding to the setup language.
  • ...

Modifying the character set used for the searches and for the sorts

To modify the character set used for the searches and for the sorts:
  1. Specify the character set to use with ChangeCharset.
  2. Re-index the data file with HIndex. Use the hChangeCharset constant to use the character set specified by ChangeCharset.
Finding out the character set of a data file

How to?

To identify the character set used by a data file, use the Charset property on the desired HFSQL data file.

Example: Changing the fonts according to the character set of the data file read

HOpen(Customer)
FileLanguage is int = Customer.Charset
// Changes the character set according to the data file format
SWITCH FileLanguage
	CASE alphabetArabic: ChangeCharset(alphabetArabic)
	CASE defaultAlphabet: ChangeCharset(defaultAlphabet)
	CASE alphabetGreek: ChangeCharset(alphabetGreek)
	CASE alphabetHebrew: ChangeCharset(alphabetHebrew)
	CASE charsetOccidental: ChangeCharset(charsetOccidental)
	CASE RussianAlphabet: ChangeCharset(RussianAlphabet)
	CASE alphabetTurkish: ChangeCharset(alphabetTurkish)
	OTHER CASE
		// Switch to western character set
	  	ChangeCharset(charsetOccidental)
END
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 03/04/2025

Señalar un error o enviar una sugerencia | Ayuda local