docs: private static int[] getMode3PrimaryCodewords(String postcode, int country, int service) {
  
          int[] postcodeNums = new int[postcode.length()];
  
          postcode = postcode.toUpperCase();
          for (int i = 0; i < postcodeNums.length; i++) {
              postcodeNums[i] = postcode.charAt(i);
              if (postcode.charAt(i) >= 'A' && postcode.charAt(i) <= 'Z') {
                  // (Capital) letters shifted to Code Set A values
                  postcodeNums[i] -= 64;
              }
              if (postcodeNums[i] == 27 || postcodeNums[i] == 31 || postcodeNums[i] == 33 || postcodeNums[i] >= 59) {
                  // Not a valid postal code character, use space instead
                  postcodeNums[i] = 32;
              }
              // Input characters lower than 27 (NUL - SUB) in postal code are interpreted as capital
              // letters in Code Set A (e.g. LF becomes 'J')
          }
  
          int[] primary = new int[10];
          primary[0] = ((postcodeNums[5] & 0x03) << 4) | 3;
          primary[1] = ((postcodeNums[4] & 0x03) << 4) | ((postcodeNums[5] & 0x3c) >> 2);
          primary[2] = ((postcodeNums[3] & 0x03) << 4) | ((postcodeNums[4] & 0x3c) >> 2);
          primary[3] = ((postcodeNums[2] & 0x03) << 4) | ((postcodeNums[3] & 0x3c) >> 2);
          primary[4] = ((postcodeNums[1] & 0x03) << 4) | ((postcodeNums[2] & 0x3c) >> 2);
          primary[5] = ((postcodeNums[0] & 0x03) << 4) | ((postcodeNums[1] & 0x3c) >> 2);
          primary[6] = ((postcodeNums[0] & 0x3c) >> 2) | ((country & 0x3) << 4);
          primary[7] = (country & 0xfc) >> 2;
          primary[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2);
          primary[9] = ((service & 0x3f0) >> 4);
  
          return primary;
      }