twbs/bootstrap — pull request #9982 by hero-m (2013-08-21 10:26:22+00:00)
Title: Fix for #9925: Convert font data to BASE64, fixing 0xEFBFBD (Unicode Replacement Character) chars in customizer fonts.

First 16 bytes in original glyphicons-halflings-regular.ttf

0000000: 0001 0000 000f 00[80] 0003 0070 4646 544d

First 16 bytes in customizer version:

0000000: 0001 0000 000f 00[ef bfbd] 0003 0070 4646

This is caused by the 'utf8' encoding in fs.readFileSync function, which replaces any unknown unicode chars with the "EF BF BD" character (all throughout the font data).

The actual fix comes from this line:

return type == 'fonts' ? files[path] = fs.readFileSync(type + '/' + path) :
files[path] = fs.readFileSync(type + '/' + path, 'utf8')

But the btoa function decreases the raw-files.js by 200kB, so I let it stay.