Index: khtml/html/html_formimpl.cpp
===================================================================
RCS file: /CVS//WebCore/khtml/html/html_formimpl.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- html_formimpl.cpp 2003/01/09 18:56:59 1.1.1.1
+++ html_formimpl.cpp 2003/01/10 11:50:28 1.2
@@ -247,8 +247,8 @@
// we need to map visual hebrew to logical hebrew, as the web
// server alsways expects responses in logical ordering
- if ( codec->mibEnum() == 11 )
- codec = QTextCodec::codecForMib( 85 );
+// if ( codec->mibEnum() == 11 )
+// codec = QTextCodec::codecForMib( 85 );
#if APPLE_CHANGES
QString encCharset = codec->name();
Index: khtml/misc/decoder.cpp
===================================================================
RCS file: /CVS//WebCore/khtml/misc/decoder.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- decoder.cpp 2003/01/09 18:57:00 1.1.1.1
+++ decoder.cpp 2003/01/10 11:50:30 1.2
@@ -303,13 +303,14 @@
#endif
bool b;
m_codec = KGlobal::charsets()->codecForName(enc, b);
-#if !APPLE_CHANGES
+
if(m_codec->mibEnum() == 11) {
- // iso8859-8 (visually ordered)
- m_codec = QTextCodec::codecForName("iso8859-8-i");
- visualRTL = true;
+ // iso8859-8 (visually ordered unless one of the following)
+ if( !(enc == "iso-8859-8-i" || enc == "iso_8859-8-i"
+ || enc == "csiso88598i" || enc == "logical") )
+ visualRTL = true;
}
-#endif
+
if( !b ) // in case the codec didn't exist, we keep the old one (fixes some sites specifying invalid codecs)
m_codec = old;
else
Index: khtml/rendering/bidi.cpp
===================================================================
RCS file: /CVS//WebCore/khtml/rendering/bidi.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -u -r1.1.1.1 -r1.3
--- bidi.cpp 2003/01/09 18:57:00 1.1.1.1
+++ bidi.cpp 2003/01/10 20:42:43 1.3
@@ -491,6 +491,8 @@
else
eor = last;
appendRun();
+ dir = QChar::DirL;
+ status.eor = QChar::DirL;
} else {
if(status.eor == QChar::DirR) {
appendRun();
@@ -572,8 +574,8 @@
case QChar::DirET:
if ( status.lastStrong == QChar::DirR || status.lastStrong == QChar::DirAL ) {
appendRun();
- dir = QChar::DirAN;
- status.eor = QChar::DirAN;
+ dir = QChar::DirEN;
+ status.eor = QChar::DirEN;
}
// fall through
case QChar::DirEN:
@@ -586,7 +588,7 @@
case QChar::DirAN:
appendRun();
status.eor = QChar::DirEN;
- dir = QChar::DirAN; break;
+ dir = QChar::DirEN; break;
case QChar::DirES:
case QChar::DirCS:
if(status.eor == QChar::DirEN) {
@@ -601,7 +603,8 @@
// neutrals go to R
eor = last;
appendRun();
- dir = QChar::DirAN;
+ dir = QChar::DirEN;
+ status.eor = QChar::DirEN;
}
else if( status.eor == QChar::DirL ||
(status.eor == QChar::DirEN && status.lastStrong == QChar::DirL)) {
@@ -613,7 +616,8 @@
eor = last;
dir = QChar::DirR;
appendRun();
- dir = QChar::DirAN;
+ dir = QChar::DirEN;
+ status.eor = QChar::DirEN;
} else {
eor = current; status.eor = dirCurrent;
}
@@ -635,6 +639,7 @@
case QChar::DirAL:
case QChar::DirEN:
appendRun();
+ dir = QChar::DirAN; status.eor = QChar::DirAN;
break;
case QChar::DirCS:
if(status.eor == QChar::DirAN) {
@@ -652,6 +657,7 @@
eor = last;
appendRun();
dir = QChar::DirAN;
+ status.eor = QChar::DirAN;
} else if( status.eor == QChar::DirL ||
(status.eor == QChar::DirEN && status.lastStrong == QChar::DirL)) {
eor = current; status.eor = dirCurrent;
@@ -663,6 +669,7 @@
dir = QChar::DirR;
appendRun();
dir = QChar::DirAN;
+ status.eor = QChar::DirAN;
} else {
eor = current; status.eor = dirCurrent;
}
@@ -730,6 +737,12 @@
case QChar::DirBN:
// ignore these
break;
+ case QChar::DirEN:
+ if ( status.last == QChar::DirL ) {
+ status.last = QChar::DirL;
+ break;
+ }
+ // fall through
default:
status.last = dirCurrent;
}
Index: khtml/rendering/bidi.h
===================================================================
RCS file: /CVS//WebCore/khtml/rendering/bidi.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- bidi.h 2003/01/09 18:57:00 1.1.1.1
+++ bidi.h 2003/01/10 18:16:07 1.2
@@ -62,12 +62,12 @@
// add level of run (cases I1 & I2)
if( level % 2 ) {
- if(dir == QChar::DirL || dir == QChar::DirAN)
+ if(dir == QChar::DirL || dir == QChar::DirAN || dir == QChar::DirEN)
level++;
} else {
if( dir == QChar::DirR )
level++;
- else if( dir == QChar::DirAN )
+ else if( dir == QChar::DirAN || dir == QChar::DirEN )
level += 2;
}
}