Home | History | Annotate | Download | only in locale

Lines Matching defs:surrogate

32  *	Encode the Unicode UTF-16 code unit c16, which may be surrogate
36 * If c16 is a high surrogate, no output will be produced, but c16
38 * passing the trailing low surrogate.
40 * If c16 is a low surrogate, it must have been preceded by a call
41 * with the leading high surrogate; at this point the combined
85 char16_t surrogate;
147 * 2. Pending high surrogate.
148 * 3. No pending high surrogate and c16 is a high surrogate.
149 * 4. No pending high surrogate and c16 is a low surrogate.
150 * 5. No pending high surrogate and c16 is a BMP scalar value.
160 * surrogate -- there's nothing we can legitimately do
165 S->surrogate = 0;
167 } else if (S->surrogate != 0) { /* 2. pending high surrogate */
169 * If the previous code unit was a high surrogate, the
170 * next code unit must be a low surrogate. Reject it
171 * if not; otherwise clear the high surrogate for next
178 const char16_t w1 = S->surrogate;
183 S->surrogate = 0;
184 } else if (c16 >= 0xd800 && c16 <= 0xdbff) { /* 3. high surrogate */
186 * No pending high surrogate and this code unit is a
187 * high surrogate. Save it for next time, and output
189 * value will be until we receive the low surrogate.
191 S->surrogate = c16;
193 } else if (c16 >= 0xdc00 && c16 <= 0xdfff) { /* 4. low surrogate */
195 * No pending high surrogate and this code unit is a
196 * low surrogate. That's invalid; fail with EILSEQ.
200 } else { /* 5. not a surrogate */