참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
Utf8ErrorFunc if a fault is
detected.
The reason indicates where in the FSM execution the fault occurred and the offset indicates where the input
failed.
The bytes represents the raw UTF-8 data that was provided and output is the current array of UTF-8 code-points,
which may be updated by the Utf8ErrorFunc.
The value of the badCodepoint depends on the reason. See Utf8ErrorReason for
details.
The function should return the number of bytes that should be skipped when control resumes to the FSM.
Parameters
| Parameter | Type |
|---|---|
reason | Utf8ErrorReason |
offset | number |
bytes | Uint8Array |
output | number[] |
badCodepoint? | number |
Returns
number
