From a9302fd1e8cd0b4d758a688a9ba5c5d3b1a3740a Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Fri, 11 Apr 2003 08:39:12 +0000 Subject: Corrected win1251 -> iso 8859-5 conversion (Alex) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3532 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 */ -- cgit v1.2.3