Plug-in Reference — Inline Functions — Editor_Convert

# Editor_Convert

Converts characters. You can use this inline function or explicitly send the EE_CONVERT or EE_CONVERT_EX message.

Editor_Convert( HWND hwnd, UINT nFlags, LPCWSTR szChars = NULL, LPCWSTR pszSeparator = NULL, UINT nSortFlags = 0, LPCWSTR pszLocale = NULL );

## Parameters

hwnd

Specifies the window handle of the view or frame of EmEditor.

nFlags

You can specify a combination of the following values.

Value | Meaning
--- | ---
FLAG_MAKE_LOWER | Converts to lowercase characters.
FLAG_MAKE_UPPER | Converts to uppercase characters.
FLAG_HAN_TO_ZEN | Converts to full-size characters.
FLAG_ZEN_TO_HAN | Converts to half-size characters.
FLAG_CAPITALIZE | Capitalizes the first letter of each word.
FLAG_MAKE_LOWER_L | Converts to lowercase characters (locale-dependent).
FLAG_MAKE_UPPER_L | Converts to uppercase characters (locale-dependent).
FLAG_CAPITALIZE_L | Capitalizes the first letter of each word (locale-dependent).
FLAG_CONVERT_SELECT_ALL | Converts the entire text. If this flag is not set, EE_CONVERT converts the characters only in the selection.
FLAG_CONVERT_KATA | Converts Katakana.
FLAG_CONVERT_ALPHANUMERIC | Converts Alphabets and numeric characters.
FLAG_CONVERT_MARK | Converts marks.
FLAG_CONVERT_SPACE | Converts spaces.
FLAG_CONVERT_KANA_MARK | Converts Kana marks.
FLAG_CONVERT_CUSTOM | When FLAG_HAN_TO_ZEN or FLAG_ZEN_TO_HAN is specified, the szChars parameter specifies which individual characters should be converted. If this value is specified, you must also specify the szChars parameter, and FLAG_CONVERT_KATA, FLAG_CONVERT_ALPHANUMERIC, FLAG_CONVERT_MARK, FLAG_CONVERT_SPACE, FLAG_CONVERT_KANA_MARK values are ignored.
FLAG_JAPANESE_YEN | Converts U+005C (REVERSE SOLIDUS) to U+FFE5 (FULLWIDTH YEN SIGN), and vice versa.
FLAG_KOREAN_WON | Converts U+005C (REVERSE SOLIDUS) to U+FFE6 (FULLWIDTH WON SIGN), and vice versa.
FLAG_RIGHT_SINGLE_QUOTATION | Converts U+0027 (APOSTROPHE) to U+2019 (RIGHT SINGLE QUOTATION MARK), and vice versa.
FLAG_RIGHT_DOUBLE_QUOTATION | Converts U+0022 (QUOTATION MARK) to U+201D (RIGHT DOUBLE QUOTATION MARK), and vice versa.

szChars

You can set a combination of individual full-width characters you want to convert if FLAG_CONVERT_CUSTOM is specified. Set this parameter NULL if not used.

pszSeparator

Specifies a string as a separator when splitting columns.

nSortFlags

You can specify a combination of the following values. SORT_ENABLED must be specified to sort split strings, and combine with other flags to specify the sort behavior. SORT_DELETE_DUPLICATE must be specified to remove duplicate split strings.

Value | Meaning
--- | ---
NORM_IGNORECASE | Case is ignored.
NORM_IGNOREKANATYPE | Hiragana and Katakana characters compare as equal.
NORM_IGNORENONSPACE | Nonspacing characters are ignored.
NORM_IGNORESYMBOLS | Symbols are ignored.
NORM_IGNOREWIDTH | The difference between half-width and full-width characters is ignored.
SORT_BINARY_COMPARISON | Fast binary comparison is used to sort. The locale information is ignored.
SORT_DATE | Sorts date and time.
SORT_DELETE_DUPLICATE | Removes duplicate split strings.
SORT_DIGITSASNUMBERS | Digits are sorted as numbers even when sorted by alphabetical order.
SORT_ENABLED | Sorts split strings.
SORT_IGNORE_PREFIX | Leading non-numeric characters are ignored when using Sort Smallest to Largest or Sort Largest to Smallest commands.
SORT_IPV4 | Sorts IPv4 addresses.
SORT_IPV6 | Sorts IPv6 addresses.
SORT_LENGTH | Sorts strings by the number of characters.
SORT_LENGTH_VIEW | Full width characters are treated as 2 characters when using Sort Shortest to Longest or Sort Longest to Shortest commands.
SORT_NUM | Sorts numbers.
SORT_GROUP_IDENTICAL | Groups identical strings when sorted by occurrence. Must be specified with SORT_OCCURRENCE.
SORT_OCCURRENCE | Sorts by occurrence.
SORT_RANDOM | Sorts randomly.
SORT_REVERSE | Sorts in reverse order.
SORT_STABLE | Stable sort is used. The stable sort maintains the relative order of records. The stable sort is usually slower.
SORT_STRINGSORT | Punctuation marks are treated the same as symbols.
SORT_TEXT | Sorts text.
SORT_WORDS | Sorts strings by the number of words.
SPLIT_DONT_DISCARD_EXTRA | Does not discard extra split strings when nLimit is not 0.

pszLocale

Specifies the locale used to sort. If this is empty, the locale specified in the Customize dialog box is used.

## Return Values

If the message succeeds, the return value is nonzero. If the message fails, the return value is zero.

## Version

Supported on Version 22.1 or later.