| 12345678910111213141516 |
- import { readFileSync } from 'node:fs';
- const p =
- 'd:/work/ylrz_saas/java/fs-service/src/test/java/com/fs/company/service/workflow/deepdialogue/SimulateDialogueFlowDiagnosticTest.java';
- const raw = readFileSync(p);
- const t = raw.toString('utf8');
- console.log('BOM', raw.length >= 3 && raw[0] === 0xef && raw[1] === 0xbb && raw[2] === 0xbf);
- console.log('FFFD', t.includes('\uFFFD'));
- console.log('u escapes', (t.match(/\\u[0-9a-fA-F]{4}/g) || []).length);
- console.log('has Ä£Äâ', t.includes('\u6a21\u62df'));
- console.log('has ÇÛ²Ë', t.includes('\u82b9\u83dc'));
- t.split('\n').forEach((line, i) => {
- if (line.includes('\uFFFD')) {
- console.log('FFFD line', i + 1, line.trim().slice(0, 120));
- }
- });
|