|
|
@@ -162,3 +162,16 @@ double CharacterFunctions::mulexp10 (const double value, int exponent) noexcept |
|
|
|
|
|
|
|
return negative ? (value / result) : (value * result);
|
|
|
|
}
|
|
|
|
|
|
|
|
juce_wchar CharacterFunctions::getUnicodeCharFromWindows1252Codepage (const uint8 c) noexcept
|
|
|
|
{
|
|
|
|
if (c < 0x80 || c >= 0xa0)
|
|
|
|
return (juce_wchar) c;
|
|
|
|
|
|
|
|
static const uint16 lookup[] = { 0x20AC, 0x0007, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
|
|
|
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0007, 0x017D, 0x0007,
|
|
|
|
0x0007, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
|
|
|
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0007, 0x017E, 0x0178 };
|
|
|
|
|
|
|
|
return (juce_wchar) lookup[c - 0x80];
|
|
|
|
}
|