A Strange Bug?

Sort:
stephen_33

Only recently I've started to notice a problem when searching for clubs with non-ASCII characters in their names - I get 'Results not found'. The first time was with Independència but I've just had the same problem with ΙRANIAN.

Checking the precise encoding of the name from the club endpoint hasn't helped...

https://api.chess.com/pub/club/independegravencia?id=21229884 .. "name":"Independ\u00e8ncia"

https://api.chess.com/pub/club/iotaranian .. "name":"\u0399RANIAN"

converting those names into printable UTF-8 strings still gives a not found result in the search box!

Am I doing something wrong or is this a bug?

skelos

You're talking about the website club search?

For endpoint access I've alway used the ASCII form of the name: ΙRANIAN -> iotaranian.

The mapping of club names to ASCII is not ideal, but for the idea of avoiding SQL injection attacks and similar I can see it being a sensible if conservative choice.

But the website ... no idea. sad.png

stephen_33

"You're talking about the website club search?" - yes Giles. 'Clubs' from the (5th. down) pop-up menu icon on the left, then enter the club name in the search bar. I think club names are encoded in UTF-8 perhaps(?) but have to be in ASCII form for the URL as you say.

When I copy the name from the club's profile page into the search bar, I get results not found for at least those two clubs - probably others about as well.

andreamorandini

Thank you @stephen_33 , I'll talk internally to understand how to solve this integration problem between website and API.

stephen_33

Thanks Andrea. At the moment I'm stuck in a slight catch 22 situation because I need to find a club's URL in order to create its API address but in those rare cases, I need the URL first to be able to find the club but the search facility isn't working!

In fact for now I'm working around the problem by following any link I can find to a particular club but sooner or later I'm going to run out of those & then I'm in trouble.

skelos

Stephen, if you get stuck, I have records for group memberships of quite a few players. Not in an ideal format to work back to a set of known groups, but not too hard either. Yell if you want help. (OK, PM would do ... wink.png)

stephen_33

Cheers Giles. So far it hasn't been a huge problem because I'm usually downloading the endpoints of clubs for which their admins have supplied links. But if I get stuck I'll be in touch  happy.png