サロゲートペア文字(例:「𠮟」や「𠀋」)は、画面上では1文字として表示されますが、数式項目で文字列操作関数(LEFT、LEN、MID、RIGHTなど)を使用すると、内部的に2文字として扱われます。
LEN("𠮟") の結果は 1 ではなく 2 になります。
LEFT("𠮟", 1) のように上位サロゲートのみを取得しようとしても、文字として正しく解釈されず、取得された文字は「?」になります。
サロゲートペア文字は、「上位サロゲート」と「下位サロゲート」という2つの値の組み合わせで構成されています。そのため、Salesforceの数式エンジンはこれを2文字としてカウントします。
サロゲートペア文字を正しく操作するには、数式内で2文字として扱います。
例: サロゲートペア文字「𠮟」を取得する場合、以下のように記述します。 LEFT("𠮟", 2)
この事象はStringクラスでも同様に発生します。詳細については、以下の記事をご参照ください。
005166849

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.