…
is Unicode/UTF-16 8230 (0x2026), which translates to UTF-8 [ 0xe2, 0x80, 0xa6 ].
Apparently the character is saved as UTF-8 on your server (localhost?), but the file is interpreted by something that isn't UTF-8-aware when it's served back to you. So each byte becomes an 8-bit (ASCII) character.
You could force the file to be ASCII-only by using String.fromCharCode(8230)
or Unicode string literal '\u2026'
, instead of using the character string literal ('…'
).