Can you name the country code?

As an hommage to @eyl327's "can you name the country code?" puzzles. Here is one more:

Given the country codes of the 10 countries in the following table, can you figure out the country code of Germany?

Bhutan                  TGH
Gabon                   AFE
Zimbabwe                WIG
Uruguay                 YHJ
Malta                   TFF
Finland                 IHF
Hungary                 UHG
United Kingdom          KNE
Republic of the Congo   GSE
Algeria                 ZHB
Germany                 ...


Hint:

the real country-code is not used

Hint 2:

the country's full name is not used directly and no single letters are taken from it.

Hint 3:

One derives from a number, one from a count and one is already a character. The order might be different.

Clarification

An earlier version of the puzzle had DSE instead of GSE as the code for the Republic of Congo. This mistake was correctly pointed out by @eyl327 and was the result of a geopolitical mixup.

• I think there must be a typo: Finland's country code is IIHF, not IHF. (Ask any Finn.)
– Bass
Apr 28, 2020 at 20:09
• I think I missed the joke about the hint too.
– m4n0
Apr 28, 2020 at 20:32
• I believe Republic of the Congo's code should start with a G (unless you meant the Democratic Republic of the Congo). Apr 28, 2020 at 21:16
• I have answers for the first 2 letters but not the third Apr 29, 2020 at 6:22
• @eyl327 well done! I have corrected the mistake, that you correctly pointed out. Apr 29, 2020 at 10:55

The country code of Germany would be

EHJ

The first letter (found by eyl327) is

the 2nd letter of the country's ISO 3166-1 Alpha-2 code

The second letter (also found by eyl327) is

the number of letters in the country's name + 1 converted to A-Z

The third letter is

the second digit of the country's calling code, plus 1, converted to A-Z
Algeria is +213, 1+1=2 → B
Finland is +358, 5+1=6 → F
Germany is +39, 9+1=10 → J

(I don't know how to make the chart, sorry ...)

• I had considered using rot13(pnyyvat pbqrf), although the shift made it extra difficult especially since 10 is not a single digit. Apr 29, 2020 at 8:15
• Ah, that's what I was missing! I'd even pored over a list of those, but could not for the life of me spot a consistent pattern. It's definitely trickier to solve when the original data are augmented like this...
– Stiv
Apr 29, 2020 at 8:59
• Unfortunately, Russia and United States would have no codes under this convention :( Apr 29, 2020 at 19:38
• Perhaps those would get an A? Apr 29, 2020 at 19:38

Credit for solving should go to Glorfindel since they were the first to answer with all three solutions.

The country code of Germany would be

EHJ

The first letter is

the 2nd letter of the country's ISO 3166-1 Alpha-2 code

Note: Republic of Congo has the code CG (not CD which is the Democratic Republic of Congo)

The second letter is

the number of letters in the country's name + 1 converted to A-Z

The third letter (found by Glorfindel) is

the second digit of the calling code + 1 converted to A-Z

Chart:

• This is exactly what I got, using the rot13(frpbaq yrggre bs gur gbc yriry Vagrearg qbznva) for the first character. Still unsure how to derive the third...
– Stiv
Apr 29, 2020 at 7:39
• @Stiv This is also true since the rot13(perngvba naq qryrtngvba bs ppGYQf vf znqr gb pbeerfcbaq jvgu gur VFB 3166-1 nycun-2 pbhagel pbqrf.) (acc. to Wikipedia) Apr 29, 2020 at 7:44
• @oAlt I think most likely they Googled something like rot13(gbc yriry qbznva bs erchoyvp bs pbatb) since the infobox gives the answer ".cd" when really that is only for Democratic Republic of Congo. If you scroll down a bit you see ".cg" for Republic of Congo. Apr 29, 2020 at 8:24
• eyl327 & @oAlt, your assumptions are correct. I underestimated your progress when you first commented and thought the D was the result of an incorrect solution path - while in fact it was caused by my limited geopolitical knowledge. Apr 29, 2020 at 10:54
• @kacase I'm assuming you're talking about eyl327's answer. I never made any progress anyway, LOL. My doubts were just reinforced after seeing eyl327's answer.
– oAlt
Apr 29, 2020 at 11:01