summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-04-11 08:39:12 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-04-11 08:39:12 +0000
commita9302fd1e8cd0b4d758a688a9ba5c5d3b1a3740a (patch)
treec80e8876cf60c15b15a57e951202ab225585b3f0 /firmware
parentf0c076565432a66be9384ddee951e82fcedfe0d3 (diff)
downloadrockbox-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')
-rw-r--r--firmware/drivers/fat.c14
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 )
/* Sergei says most russians use Win1251, so we will too.
Win1251 differs from ISO 8859-5 by an offset of 0x10. */
case 0x04: /* cyrillic, convert to Win1251 */
- iso[i] = unicode[x] + 0xb0; /* 0xa0 for ISO 8859-5 */
+ switch (unicode[x]) {
+ case 1:
+ iso[i] = 168;
+ break;
+
+ case 81:
+ iso[i] = 184;
+ break;
+
+ default:
+ iso[i] = unicode[x] + 0xb0; /* 0xa0 for ISO 8859-5 */
+ break;
+ }
break;
case 0x05: /* hebrew, convert to ISO 8859-8 */