The network name has to match exactly
The SSID field is compared character for character, so capitalization, spaces and trailing punctuation all matter: "Cafe WiFi" and "Cafe Wifi" are different networks as far as the phone is concerned. Copy it from the router’s admin page rather than from memory. Punctuation in either field is fine: semicolons, colons, commas, quotes and backslashes are escaped for you, so a password like "Apt;2b" encodes correctly.