26 ms·
Pro tip: Use non-ascii characters in your test data. Instead of John Smith, try Helmut Müller. This will make sure your code is unicode safe, and also make sure
by herge 10y ago
Pro tip: Use non-ascii characters in your test data. Instead of John Smith, try Helmut Müller. This will make sure your code is unicode safe, and also make sure that external dependencies (hey, our spreadsheet library silently fails when a ü is in the file name!) also work correctly with unicode.
- dom0 10y agoGerman Umlauts are not a good test vector, because various SBCS have them as well (latin-1 and others), and can slip through systems not correctly processing Unicode. Use CJK instead, eg. 나윤선, which will just explode into an obvious gooey mess if the processing pipeline isn't handling Unicode correctly somewhere.
- herge 10y agoI use a site like http://lingojam.com/FancyTextGenerator http://lingojam.com/FancyTextGenerator to generate 𝖚𝖘𝖊𝖋𝖚𝖑 𝖙𝖊𝖘𝖙 𝖉𝖆𝖙𝖆. The only downside is that it has taught me that my favourite debugger is not unicode safe :(
- WorldMaker 10y agoAlso, you can litter your test data with all the fancy emoji you can type in a modern OS these days, those are almost always instantly recognizable when correct versus incorrect and test a fun number of things given: 1) Most (but not all) emoji exist way out in the Astral Plane (a good stress test for UTF-8/UTF-16 handling and little/big endian issues) 2) Emoji can contain "exotic" sequences like Zero Width Joiners (this can be very important to avoid codepoint counting issues because a ZWJ sequence of codepoints is a very different emoji if the codepoints are incorrectly reversed or spliced) 3) Emoji can test your font display stack for inefficiencies in system font fallback (and support for modern typography in general)
- Tempest1981 10y agoI like to use "Tokyo" in kanji, since I can remember what the characters look like: 東京 Is that a good test?