6 Appendix A: Product Behavior

  • Windows NT operating system

  • Windows 2000 operating system

  • Windows XP operating system

  • Windows Server 2003 operating system

  • Windows Vista operating system

  • Windows Server 2008 operating system

  • Windows 7 operating system

  • Windows Server 2008 R2 operating system

  • Windows 8 operating system

  • Windows Server 2012 operating system

  • Windows 8.1 operating system

  • Windows Server 2012 R2 operating system

  • Windows 10 operating system

  • Windows Server 2016 operating system

Exceptions, if any, are noted below. If a service pack or Quick Fix Engineering (QFE) number appears with the product version, behavior changed in that service pack or QFE. The new behavior also applies to subsequent service packs of the product unless otherwise specified. If a product edition appears with the product version, behavior is different in that product edition.

Unless otherwise specified, any statement of optional behavior in this specification that is prescribed using the terms SHOULD or SHOULD NOT implies product behavior in accordance with the SHOULD or SHOULD NOT prescription. Unless otherwise specified, the term MAY implies that the product does not follow the prescription.

<1> Section 3.1.5.2.3: Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, and Windows Server 2016 do not use record count for DEFAULT.

<2> Section 3.1.5.2.3: An LCID is used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

<3> Section 3.1.5.2.3.1:  The files in the download map to specific Windows versions as follows:

Version

File Name

Windows NT 4.0 operating system, Windows 2000, Windows XP, and Windows Server 2003

Windows NT 4.0 through Windows Server 2003 Sorting Weight Table.txt

Windows Vista

Windows Vista Sorting Weight Table.txt

Windows Server 2008

Windows Server 2008 Sorting Weight Table.txt

Windows 7  and Windows Server 2008 R2

Windows 7 and Windows Server 2008 R2 Sorting Weight Table.txt

Windows 8, Windows 8.1, Windows Server 2012, and Windows Server 2012 R2

Windows 8 and Windows Server 2012 Sorting Weight Table.txt
Windows 8 Upper Case Mapping Table.txt

Windows 10 and Windows Server 2016

Windows 10 Sorting Weight Table.txt

<4> Section 3.1.5.2.16: The following MapOldHangulSortKey algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

 COMMENT MapOldHangulSortKey
 COMMENT
 COMMENT  On Entry:  SourceString   - Unicode String to test
 COMMENT             SourceIndex    - Index of leading Jamo to start 
 COMMENT                              from
 COMMENT             SortLocale     - Locale to use for linguistic
 COMMENT                              sort data
 COMMENT             UnicodeWeights - String to store any Unicode
 COMMENT                              weight found
 COMMENT                              for this character(s)
 COMMENT
 COMMENT  On Exit:   CharactersRead - Number of old Hangul found 
 COMMENT             UnicodeWeights - Any Unicode weights found are 
 COMMENT                              appended
 COMMENT
  
 PROCEDURE MapOldHangulSortKey(IN SourceString : Unicode String,
                    IN SourceIndex : 32 bit integer,
                    IN SortLocale : LCID,
                    IN OUTUnicodeWeights : String of UnicodeWeightType,
                    IN IsKoreanLocale : Boolean,
                    OUT CharactersRead : 32 bit integer)
  
 SET CurrentIndex to SourceIndex
 SET JamoSortInfo to empty JamoSortInfoType
  
 // Get any Old Hangul Leading Jamo composition for our Leading Jamo
 SET JamoClass to CALL GetJamoComposition WITH (SourceString,
                 SourceIndex, "Leading Jamo Class", JamoSortInfo)
  
 IF JamoClass is equal to "Vowel Jamo Class" THEN
     // A Vowel Jamo, try to find an  
     // Old Hangul Vowel Jamo composition.
     SET JamoClass to CALL GetJamoComposition WITH (SourceString,
                 SourceIndex, "Vowel Jamo Class", JamoSortInfo)
 ENDIF
  
 IF JamoClass is equal to "Trailing Jamo Class" THEN
     // A Trailing Jamo, try to find an 
     // Old Hangul Trailing Jamo composition.
     SET JamoClass CALL GetJamoComposition WITH (SourceString,
                 SourceIndex, "Trailing Jamo Class", JamoSortInfo)
 ENDIF
  
 // A valid leading and vowel sequence and this is 
 // old Hangul...
 IF JamoSortInfo.OldHangulFlag is true THEN
  
     // Compute the modern hangul syllable prior to this composition
     // Users formula from Unicode 3.0 Section 3.11 p54
     // "Hangul Syllable Composition"
     // This converts a U+11.. sequence to a U+AC00 character
  
     SET ModernHangul to (JamoSortInfo.LeadingIndex *
                NLS_JAMO_VOWELCOUNT + JamoSortInfo.VowelIndex) *
                NLS_JAMO_TRAILING_COUNT + JamoSortInfo.TrailingIndex +
                NLS_HANGUL_FIRST_SYLLABLE
  
     IF JamoSortInfo.FillerUsed is true THEN
         // If the filler is used, sort before the modern Hangul, 
         // instead of after
         DECREMENT ModernHangul
  
         // If falling off the modern Hangul syllable block...
         IF ModernHangul is less than NLS_HANGUL_FIRST_SYLLABLE THEN
             // Sort after the previous character
             // (Circled Hangul Kiyeok A)
            SET ModernHangul to 0x326e
         ENDIF
  
         // Shift the leading weight past any old Hangul
         // that sorts after this modern Hangul
         SET JamoSortInfo.LeadingWeight to
             JamoSortInfo.LeadingWeight + 0x80
     ENDIF
  
     // Store the weights
     SET CharacterWeight to CALL GetCharacterWeights WITH (ModernHangul)
     SET UnicodeWeight to CALL CorrectUnicodeWeight
             WITH (CharacterWeight, IsKoreanLocale)
     APPEND UnicodeWeight to UnicodeWeights
  
     // Add additional weights
     SET UnicodeWeight to CALL MakeUnicodeWeight WITH 
             (ScriptMember_Extra_UnicodeWeight,
              JamoSortInfo.LeadingWeight, false)
     APPEND UnicodeWeight to UnicodeWeights
  
     SET UnicodeWeight to CALL MakeUnicodeWeight WITH
             (ScriptMember_Extra_UnicodeWeight,
              JamoSortInfo.VowelWeight, false)
  
     APPEND UnicodeWeight to UnicodeWeights
     SET UnicodeWeight to CALL MakeUnicodeWeight WITH 
             (ScriptMember_Extra_UnicodeWeight,
              JamoSortInfo.TrailingWeight, false)
  
     APPEND UnicodeWeight to UnicodeWeights
  
     // Return the characters consumed
     SET CharactersRead to CurrentIndex - SourceIndex
     RETURN CharactersRead
 ENDIF
  
 // Otherwise it isn't a valid old Hangul composition
 // and don't do anything with it
  
 SET CharactersRead to 0
 RETURN CharactersRead

<5> Section 3.1.5.2.17: The GetJamoComposition algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

<6> Section 3.1.5.2.18: The following GetJamoStateData algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008,  Windows 7, and Windows Server 2008 R2.

 COMMENT GetJamoStateData
 COMMENT
 COMMENT  On Entry:  Character     - Unicode Character to get Jamo 
 COMMENT                             information for
 COMMENT 
 COMMENT  On Exit:   JamoStateData - Jamo state information from 
 COMMENT                             the data file
 COMMENT
 COMMENT  Jamo State information looks like this in the database:
 COMMENT
 COMMENT   SORTTABLES
 COMMENT     ...
 COMMENT     JAMOSORT395
 COMMENT     ...
 COMMENT   0x11724 
 COMMENT     0x1172 0x00 0x00 0x11 0x00 0x380x03; U+1172 
 COMMENT     0x1161 0x01 0x00 0x00 0x00 0x000x01; U+1172,1161 
 COMMENT     0x1175 0x01 0x00 0x11 0x1b 0x3a0x00; U+1172,1161,1175 
 COMMENT     0x1169 0x01 0x00 0x11 0x1b 0x3f0x00; U+1172,1169
  
 PROCEDURE GetJamoStateData (IN Character : Unicode Character,
                             OUT JamoStateData : JamoStateDateType)
  
 // Get the Jamo section for this character.
 // If Character was 0x1172, this would access the following section:
 // 0x11724 
 //    0x1172 0x00 0x00 0x11 0x00 0x38 0x03 ; U+1172           record 0
 //    0x1161 0x01 0x00 0x00 0x00 0x00 0x01 ; U+1172,1161      record 1
 //    0x1175 0x01 0x00 0x11 0x1b 0x3a 0x00 ; U+1172,1161,1175 record 2
 //    0x1169 0x01 0x00 0x11 0x1b 0x3f 0x00 ; U+1172,1169      record 3
 //    |     |    |    |    |    |    |       |
 // Field 1  2    3    4    5    6    7       Comment
  
 OPEN SECTION JamoSection
      where name is SORTTABLES\JAMOSORT\[Character] from unisort.txt
  
 // Now open the first record
 SELECT RECORD JamoRecord FROM JamoSection WHERE record index is 0
  
 // Now gather the information from that record.
 SET JamoStateData.OldHangulFlag   to JamoRecord.Field2
 SET JamoStateData.LeadingIndex    to JamoRecord.Field3
 SET JamoStateData.VowelIndex      to JamoRecord.Field4
 SET JamoStateData.TrailingIndex   to JamoRecord.Field5
 SET JamoStateData.ExtraWeight     to JamoRecord.Field6
 SET JamoStateData.TransitionCount to JamoRecord.Field7
  
 // Remember the record
 SET JamoStateData.DataRecord to JamoRecord
  
 RETURN JamoStateData

<7> Section 3.1.5.2.19: The FindNewJamoState algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

<8> Section 3.1.5.2.20: The following UpdateJamoSortInfo algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

 COMMENT UpdateJamoSortInfo
 COMMENT
 COMMENT  On Entry:  JamoClass     - The current Jamo Class
 COMMENT             JamoStateData - Information about the new
 COMMENT                             character state
 COMMENT             JamoSortInfo  - Information about the character
 COMMENT                             state
 COMMENT
 COMMENT  On Exit:   JamoSortInfo  - Updated with information about
 COMMENT                             the new state based on JamoClass
 COMMENT                             and JamoSortData
 COMMENT
  
 PROCEDURE UpdateJamoSortInfo(IN JamoClass : enumeration,
                              IN JamoStateData : JamoStateDataType,
                              INOUT JamoSortInfo : JamoSortInfoType)
  
 // Record if this is a Jamo unique to old Hangul
 SET JamoSortInfo.OldHangulFlag to
     JamoSortInfo.OldHangulFlag | JamoStateData.OldHangulFlag
  
 //  Update the indices if the new ones are higher than the current
 //  ones.
 IF JamoStateData.LeadingIndex
    is greater than JamoSortInfo.LeadingIndex THEN
    SET JamoSortInfo.LeadingIndex to JamoStateData.LeadingIndex;
 ENDIF
  
 IF JamoStateData.VowelIndex
    is greater than JamoSortInfo.VowelIndex THEN
    SET JamoSortInfo.VowelIndex to JamoStateData.VowelIndex;
 ENDIF
  
 IF JamoStateData.TrailingIndex
    is greater than JamoSortInfo.TrailingIndex THEN
    SET JamoSortInfo.TrailingIndex to JamoStateData.TrailingIndex;
 ENDIF
  
 //  Update the extra weights according to the current Jamo class.
 CASE JamoClass OF
    "Leading Jamo Class":
       IF JamoStateData.ExtraWeight
          is greater than JamoSortInfo.LeadingWeight THEN
          SET JamoSortInfo.LeadingWeight to JamoStateData.ExtraWeight
       ENDIF
  
    "Vowel Jamo Class":
       IF JamoStateData.ExtraWeight
          is greater than JamoSortInfo.VowelWeight THEN
          SET JamoSortInfo.VowelWeight to JamoStateData.ExtraWeight
       ENDIF
  
    "Trailing Jamo Class":
    IF JamoStateData.ExtraWeight
       is greater than JamoSortInfo.TrailingWeight THEN
       SET JamoSortInfo.TrailingWeight to JamoStateData.ExtraWeight
    ENDIF
 ENDCASE
  
 RETURN JamoSortInfo

<9> Section 3.1.5.2.21: The IsJamo algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

<10> Section 3.1.5.2.22: The IsCombiningJamo algorithm is only used in Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, and Windows Server 2016.

<11> Section 3.1.5.2.23: The following IsJamoLeading algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2.

 COMMENT IsJamoLeading 
 COMMENT
 COMMENT  On Entry:  SourceCharacter - Unicode Character to test
 COMMENT
 COMMENT  On Exit:   Result          - true if SourceCharacter is a
 COMMENT                               leading Jamo
 COMMENT
 COMMENT NOTE: Only call this if the character is known to be a Jamo
 COMMENT       syllable. This function only helps distinguish between
 COMMENT       the different types of Jamo, so only call it if
 COMMENT       IsJamo() has returned true.
 COMMENT
  
 PROCEDURE IsJamoLeading(IN SourceCharacter : Unicode Character,
                         OUT Result: boolean)
  
 IF SourceCharacter is less than NLS_CHAR_FIRST_VOWEL_JAMO THEN
      SET Result to true
 ELSE
      SET Result to false
 ENDIF
  
 RETURN Result

<12> Section 3.1.5.2.24: The IsJamoVowel algorithm is only applicable to Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, and Windows Server 2016.

<13> Section 3.1.5.2.25: The following IsJamoTrailing algorithm is only used in Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008,  Windows 7, and Windows Server 2008 R2.

 COMMENT IsJamoTrailing
 COMMENT
 COMMENT  On Entry:  SourceCharacter - Unicode Character to test
 COMMENT
 COMMENT  On Exit:   Result          - true if this is a trailing Jamo
 COMMENT
 COMMENT NOTE: Only call this if the character is known to be a Jamo
 COMMENT       syllable. This function only helps distinguish between
 COMMENT       the different types of Jamo, so only call it if
 COMMENT       IsJamo() has returned true.
 COMMENT
  
 PROCEDURE IsJamoTrailing(IN SourceCharacter : Unicode Character,
                          OUT Result: boolean)
  
 IF SourceCharacter is greater than
    or equal to NLS_CHAR_FIRST_VOWEL_JAMO THEN
      SET Result to true
 ELSE
      SET Result to false
 ENDIF
  
 RETURN Result

<14> Section 3.1.5.4: Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 operating system follow IDNA2003.

Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, and Windows Server 2016 follow the IDNA2008+UTS46 rules.

<15> Section 3.1.5.4.6: This version is used in Windows 8, Windows Server 2012, Windows 8.1, Windows Server 2012 R2, Windows 10, and Windows Server 2016.

<16> Section 3.1.5.4.7: This version is used in Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2

Show: