farkam135 / GoIV

https://www.reddit.com/r/goiv
Other
372 stars 138 forks source link

fixed the issue that needed non-ascii charactors are removed #963

Closed udnp closed 6 years ago

udnp commented 6 years ago

This PR is a minor improvement for Latin characters (but critical fix for the other characters...) because in non Latin characters the needed characters to detect Pokemon name are removed.

It should be better that the "combining characters" are removed instead of non ascii characters.

https://en.wikipedia.org/wiki/Combining_character

udnp commented 6 years ago

I've checked this PR with some Alolan pokemons in Spanish locale.

07-30 14:48:59.529 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() typeName:PSÍQUICO
07-30 14:48:59.531 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() cleanedType:PSIQUICO

-> OK.

07-30 14:52:44.672 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() typeName:DRAGÓN
07-30 14:52:44.674 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() cleanedType:DRAGON

-> OK

07-30 14:52:30.519 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() typeName:ELÉCTRICO
07-30 14:52:30.521 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: PokeInfoCalculator#getTypeName() cleanedType:ELECTRICO

-> OK

udnp commented 6 years ago

device-2018-07-30-145212

I've seen sometimes Alolan Raichu can not be detected. It seems just because scanned pokemon type is wrong.

07-30 14:48:59.528 19681-19681/com.swanberg.pogoiv.nointernet.debug D/xxx: ScanData#getPokemonType() pokemonType:ELECTRICO / pleUIco