ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL
  • Overview
  • How to?
  • Creating a Unicode item in the analysis
  • Switching from Unicode to ANSI (and conversely) in the data model editor
  • For information
  • Controls linked to the items
  • Programming in WLanguage
  • Search performed by HReadSeek
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Managing the Unicode format in the HFSQL files
ODBCOLE DBNot available with these kinds of connection
Overview
The analysis proposes two types of Unicode items:
  • "Unicode Text" item
  • "Unicode Memo" item.
These items are used to store information in Unicode format.
These items can be associated with a language: the sort performed on the item will take the specified language into account. The association with the language can be done:
The texts entered in the Unicode items are automatically supported by the different controls found in the window or in the page, the tables, ...
How to?

Creating a Unicode item in the analysis

When the item is created in the data model editor (for more details, see Operations on the items), all you have to do is specify the requested sub-type for the item. A Text item can be:
  • A string (corresponds to an Ansi character string)
  • A character
  • Unicode (corresponds to a Unicode character string)
  • Text memo (corresponds to an Ansi text memo)
  • Unicode text memo (corresponds to a Unicode text memo).
When selecting a Unicode type (string or text memo), the data model editor allows you to specify the characteristics of the language that will be entered in this item.
These characteristics are required to perform the sort on the item.
  • If a language is selected, this language will be used to perform the sorts on the current item. An linguistic sort will be performed. The sort is performed according to the following order:
    1. Sort performed on the entire string.
    2. Taking the accented characters into account.
    3. Taking the uppercase characters into account.
  • If the "Language" option corresponds to "< Defined at creation >", you have the ability to specify the characteristics of the language through programming via the H.LanguageCreationUnicode variable. This variable must be used before creating the data files (HCreation or HCreationIfNotFound). Therefore, the same analysis can be used to manage several Unicode languages.
  • If the "Language" option corresponds to "<Binary sort>", the sort will be performed by comparing the binary value of the bytes. This type of sort is very fast. It should be used to perform an exact-match search for example.
  • If the "Language" option corresponds to "<Fast sort (multilingual)>", a comparison will be performed character by character according to a generic sort. The same sort will be performed, regardless of the characters found in the item.

Switching from Unicode to ANSI (and conversely) in the data model editor

The sub-type of an item can be modified by switching it from ANSI to Unicode (and conversely). In this case, an automatic data modification will be performed.
The conversion from ANSI to Unicode will be performed according to the specified language.
The conversion from Unicode to ANSI will be performed according to the current language.
For information

Controls linked to the items

When the controls are created (in a window or in a page), you have the ability to specify whether the control supports the Unicode format or not (check "Unicode" in the "General" tab of the description window of the control).
When creating the controls linked to a Unicode item, "Unicode" is automatically checked in the control description.
The Unicode property is used to determine and specify whether the value of a control is a Unicode string.

Programming in WLanguage

The method for programming the files containing Unicode items is identical to the method for programming the files containing ANSI items. The language options defined in the data model editor are taken into account during the indexed browses and during the sorts to define the order of records.
The Type property is used to determine whether an item is a Unicode or Ansi item.

Search performed by HReadSeek

No generic search should be performed on the Unicode items that are case sensitive. Indeed, the coding of characters being specific in Unicode, this type of search may return invalid or incomplete results.
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help