6.1.4:The
Character Chunk
キャラクター・チャンク
A character
is a single
character, which may be a letter, digit, punctuation mark,
or control character.
キャラクターとは単一の文字で、通常の文字、数字、句読記号、或いは制御文字などにいなります。
A character
cannot contain any
other chunk type. It can be contained in any other chunk
type.
キャラクターは他の形式のチャンクを含むことができません。ただ、他のチャンク形式のどれにでも含まれることができます。
You can use the abbreviation char
as a synonym for
character in a chunk expression.
チャンク表現式では、characterの類義語として、短縮形のcharを使うことができます。
Important:
Characters in chunk
expressions are assumed to be single-byte characters. To
successfully use chunk expressions with Unicode
(double-byte) text, you must treat each double-byte
character as a set of two single-byte characters. For
example, to get the numeric value of the third Unicode
character in a field, use a statement like the following:
重要:チャンク表現でのキャラクタは1バイト・キャラクタを想定しています。ユニコード(2バイト)文字とチャンク形式を巧く使うには、各2バイト・キャラクタを一組の2つの1バイト・キャラクタとして扱う必要があります。例えば、或るフィールドの三番目のユニコード・キャラクタの数値を得るには、次の様なステイトメントを使います:
get
charToNum(char 5 to 6 of field "Chinese Text")
-- char ((charNum* 2) - 1) to (charNum * 2) is
-- the single-byte equivalent of the double-byte
-- character "charNum" of the field.