@@ -439,9 +439,6 @@ private void loadFileData() throws IOException {
439439 sources =
440440 VersionedProperty .parseUnicodeSet (
441441 codelist , VersionedSymbolTable .forDevelopment ());
442- if (sources .contains ("ᢰ" )) {
443- int x = 0 ;
444- }
445442 } else {
446443 final String [] codes = Utility .split (codelist , ' ' );
447444 for (final String code : codes ) {
@@ -513,12 +510,8 @@ private void loadFileData() throws IOException {
513510 UnicodeSet hasRecommendedScript = new UnicodeSet ();
514511 Set <String > scripts = LATEST .load (UcdProperty .Script ).values ();
515512 for (final String script : scripts ) {
516- String shortName = UcdPropertyValues .Script_Values .forName (script ).getShortName ();
517- Info scriptInfo = ScriptMetadata .getInfo (shortName );
518- if (scriptInfo == null ) {
519- System .out .println ("No script metadata info for: " + script );
520- }
521- if (scriptInfo != null && scriptInfo .idUsage == IdUsage .RECOMMENDED ) {
513+ IdUsage idUsage = getScriptUsage (script );
514+ if (idUsage == IdUsage .RECOMMENDED ) {
522515 final UnicodeSet us = ScriptInfo .IDENTIFIER_INFO .getSetWith (script );
523516 if (us != null ) {
524517 hasRecommendedScript .addAll (us );
@@ -528,9 +521,7 @@ private void loadFileData() throws IOException {
528521 hasRecommendedScript .freeze ();
529522
530523 for (final String script : scripts ) {
531- String shortName = UcdPropertyValues .Script_Values .forName (script ).getShortName ();
532- Info scriptInfo = ScriptMetadata .getInfo (shortName );
533- final IdUsage idUsage = scriptInfo != null ? scriptInfo .idUsage : IdUsage .EXCLUSION ;
524+ final IdUsage idUsage = getScriptUsage (script );
534525 IdentifierInfo .Identifier_Type status ;
535526 switch (idUsage ) {
536527 // case ASPIRATIONAL:
@@ -673,6 +664,38 @@ private void loadFileData() throws IOException {
673664
674665 }
675666
667+ private IdUsage getScriptUsage (String longScriptName ) {
668+ String shortName = UcdPropertyValues .Script_Values .forName (longScriptName ).getShortName ();
669+ Info scriptInfo = ScriptMetadata .getInfo (shortName );
670+ IdUsage idUsage ;
671+ if (scriptInfo == null ) {
672+ System .out .println ("No script metadata info for: " + longScriptName );
673+ idUsage = IdUsage .EXCLUSION ;
674+ } else {
675+ idUsage = scriptInfo .idUsage ;
676+ }
677+ // Sometimes UAX #31 and CLDR script metadata are updated but the Unicode Tools still
678+ // depend on an older version.
679+ // We temporarily override ID Usage values here.
680+ // See https://github.com/unicode-org/unicodetools/pull/1185 for an example.
681+ switch (longScriptName ) {
682+ case "Gunjala_Gondi" :
683+ // [184-C33] Consensus: Change the Identifier_Type values for
684+ // Gunjala Gondi characters (sc=Gong) from Limited_Use to Excluded,
685+ // to match the UAX31 classification of the script.
686+ // For Unicode Version 17.0. See L2/25-183 item 6.4.
687+ // [184-A76] Action Item for Josh Hadley, PAG:
688+ // Derive the Identifier_Type values for Gunjala Gondi characters from
689+ // the UAX31 classification of the script as specified.
690+ // For Unicode Version 17.0. See L2/25-183 item 6.4.
691+ System .out .println (
692+ "TODO: Replace Gunjala_Gondi=Excluded override with CLDR update" );
693+ return IdUsage .EXCLUSION ;
694+ default :
695+ return idUsage ;
696+ }
697+ }
698+
676699 private void addToRemovalSets (
677700 String codepoint , final IdentifierInfo .Identifier_Type identifierType ) {
678701 Set <Identifier_Type > oldSet = identifierTypesMap .get (codepoint );
0 commit comments