Consider the following POC:

---
CREATE VIRTUAL TABLE temp . v0 USING fts4 ( v1 ) ;
INSERT INTO v0 ( v1 ) VALUES ( 10 );
PRAGMA encoding='UTF-16be';
INSERT INTO v0 ( v1 ) VALUES ( 10 );
---

It triggers an assertion fail in debug build of latest chunk and latest release.