> Date: Sun, 9 Oct 2011 18:21:43 +0800 > From: li bo <[email protected]> > List-software: Ecartis version 1.0.0 > > Before determining embedding levels for characters, assign directional types > like this > // assign directional types > classify(pszInput, types, cch); > And after determining embedding levels, assign directional types again ,but > for WS,S > // assign directional types again, but for WS, S this time > classify(pszInput, types, cch, true); > > Why not assign directional types for WS and S in the first time?
The second call to 'classify' is due to L1, which says that certain types of characters should have their level reset to the paragraph embedding level. You cannot do this in the first place, because the parts of the UBA before that need to distinguish between segment separators, paragraph separators, and whitespace. L1 is one of the last stages of processing, when the original bidi properties were already taken into account, so it is possible at this stage to reset the levels of these characters.

