diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-04-11 08:39:12 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-04-11 08:39:12 +0000 |
commit | a9302fd1e8cd0b4d758a688a9ba5c5d3b1a3740a (patch) | |
tree | c80e8876cf60c15b15a57e951202ab225585b3f0 /firmware/drivers | |
parent | f0c076565432a66be9384ddee951e82fcedfe0d3 (diff) | |
download | rockbox-a9302fd1e8cd0b4d758a688a9ba5c5d3b1a3740a.tar.gz rockbox-a9302fd1e8cd0b4d758a688a9ba5c5d3b1a3740a.zip |
Corrected win1251 -> iso 8859-5 conversion (Alex)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3532 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/fat.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index cfff3e869c..7d87a8ae9c 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -1670,7 +1670,19 @@ static void unicode2iso(unsigned char* unicode, unsigned char* iso, int count ) | |||
1670 | /* Sergei says most russians use Win1251, so we will too. | 1670 | /* Sergei says most russians use Win1251, so we will too. |
1671 | Win1251 differs from ISO 8859-5 by an offset of 0x10. */ | 1671 | Win1251 differs from ISO 8859-5 by an offset of 0x10. */ |
1672 | case 0x04: /* cyrillic, convert to Win1251 */ | 1672 | case 0x04: /* cyrillic, convert to Win1251 */ |
1673 | iso[i] = unicode[x] + 0xb0; /* 0xa0 for ISO 8859-5 */ | 1673 | switch (unicode[x]) { |
1674 | case 1: | ||
1675 | iso[i] = 168; | ||
1676 | break; | ||
1677 | |||
1678 | case 81: | ||
1679 | iso[i] = 184; | ||
1680 | break; | ||
1681 | |||
1682 | default: | ||
1683 | iso[i] = unicode[x] + 0xb0; /* 0xa0 for ISO 8859-5 */ | ||
1684 | break; | ||
1685 | } | ||
1674 | break; | 1686 | break; |
1675 | 1687 | ||
1676 | case 0x05: /* hebrew, convert to ISO 8859-8 */ | 1688 | case 0x05: /* hebrew, convert to ISO 8859-8 */ |