I will explain the use point of the character string type.

String types can specify several more attributes."Model definition> type>Types available in WagbyPlease read.

In Wagby, the entered value is corrected by "filter". "Filter" can be automatically corrected by the filter.This function is set automatically.

Figure 1 Input filter

The filters that can be selected for the string type item are as follows.

String (General)

Filter that determines input value as "character string".We recommend that you select "String (General)" filter for items that contain values ​​that contain Japanese.The following processing is performed.

  • Delete previous and next spaces (halfwidth/double-byte space and tab)
  • Unify the line feed code to "LF".
  • Full-width alphabets, numbers,symbolMake each one half-width.
  • Hankaku katakana is set to full-width katakana.
  • We will unify full-width minus characters such as "-" (minus), "-" (long note), "-" (dash), "-" (hyphen) to "-" (long note).

That is, this designation includes "character string (minimum)" "half size - full width" "full width single byte" to be described later.

String (minimum)

Unify the line feed code to "LF".

By unifying the line feed code to "LF", regardless of the client OS used by the user, the character string stored in the database always guarantees that the line feed character is LF.

Half size -> full width

If half-width characters are included in the input value, it will be converted to full-width characters corresponding to this one-byte character.

Half size → full width (only for Kana)

If half-width katakana is included in the input value, this half-width katakana is converted to full-width katakana.

Half size → full width (including blank)

If half-width characters are included in the input value, it will be converted to full-width characters corresponding to this one-byte character.Also convert single-byte spaces to double-byte spaces.

Fullwidth → Half size

When double-byte characters are included in the input value, it converts to this one-byte character corresponding to this double-byte character.If there is no corresponding one-byte character, it will not be converted.

Full-width → Half-width (including blank)

When double-byte characters are included in the input value, it converts to this one-byte character corresponding to this double-byte character.Also convert double-byte spaces to single-byte spaces.If there is no corresponding one-byte character, it will not be converted.

The filter can not be "none".If this field is left blank, the standard filter corresponding to the type is automatically selected rather than without a filter.In the case of the character string type, "character string (general)" is applied.If you want to save full-size alphanumeric characters or half-width kana characters as is, select "String (minimum)".
Both the Web form, upload update, and REST API are used in common for the filter.

Allowable character typeWhen you specify, "String (minimum)" filter is automatically applied.

For example, if you specify a full-width numeric character for an allowable character type, if the input filter remains "character string (general)", the filter converts "full-width numeric" to "half-width numeric" so that input can not be performed.
Avoid this problem by setting the filter to "string (minimum)".

Depending on the business specifications, it may be better to change the filter.

Zip code, address item

"String> Zip CodePlease read.

I want to input half-width kana characters only

FilterString (minimum)I will.Then specify the allowable character type as follows.

  • Allowable character type setting: Katakana - half-width character
  • Allowable character type setting: space

Within Wagby there is no limitation on the size of the string type. But when saved in the database, it needs to fit within the column of the database.

The standard sizes of string types stored in the database are as follows.

Database Definition
Oracle varchar2(255 char)
SQL Server nvarchar(255)
DB2 varchar(255)
MySQL varchar(255)
The number specified by varchar type depends on MySQL version.Before 4.1, it is in "byte" unit, but after that it is in "character" unit.Please check the MySQL manual for details.
PostgreSQL varchar(255)
HSQLDB (embedded DB) varchar(255)