PDA

View Full Version : Special characters



justoagv
06-07-2011, 04:54 PM
Hello,

I'm running some queries in the database directly (psql client) but I'm having trouble with players whose nickname has special characters, e.g:

select player_id from players where playername='Têst';

ERROR: invalid byte sequence for encoding "UTF8": 0xf4207c27
SUGERENCIA: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding"

However if I try with a different encoding, e.g:

\encoding SQL_ASCII

I get the same error.

Is there any solution for this?

Kind regards
justoagv

louis2609
06-08-2011, 12:15 AM
I think you should check your code with UTF8: " ERROR: invalid byte sequence for encoding "UTF8": 0xf4207c27 ", you see the notification here.

Patvs
06-08-2011, 12:37 AM
Which PostgreSQL version are you using?

The postgres user and your database are both in the same encoding (UTF8)?
Can you update PostgreSQL to 8.4.8 (if you were using 8.4.x) from PostgreSQL: The world's most advanced open source database (http://www.postgresql.org)

justoagv
06-08-2011, 02:21 PM
Hello Patvs,

Thank you for following up this issue.

I have Postgrees 8.4, and what I see is that both the holdemmanager database and the psql client use UTF8 enconding:

Database:

from pgAdmin->Servers/Data bases/Holdemmanage/Properties/Encoding

Encoding:

from psql-> \encoding returns "UTF8"

I have postgrees 8.4.1 and I can try to migrate to 8.4.8, but do you know if it will fix for sure this problem?

Kind regards
Justo

Patvs
06-08-2011, 07:23 PM
It's likely an upgrade to 8.4.8 fixes this.
It fixes most language (usually German, Turkish) issues.

And you don't have to migrate the database.
If you install SQL 8.4.8 it will upgrade your current installation from 8.4.1 to 8.4.8

(although you may still need to create a new database)

Lyufer
06-18-2011, 07:18 AM
Have a problem with some special characters
ö,å,â,ë,ÿ - doesn't work
á,ó work fine.
This is not full list of chars, only I checked manually
For example nickname
'tesöt' recorded in DB like 'tesГ¶t'

Patvs
06-18-2011, 07:49 AM
On which pokersite are players usinng: ö,å,â,ë,ÿ in their name?


HoldemManager uses a UTF8 encoding PostrgeSQL database which doesn't support those characters.

So a player like 'tesöt' will just show up as 'tesГ¶t' in the database.

Lyufer
06-18-2011, 07:55 AM
pokerstars.com
I tryed Postres 9.0. Still have a problem.
So, what is the solution ?

Patvs
06-18-2011, 08:18 AM
There is no solution. The PostgreSQL database can't handle such characters.

So 'tesöt' will just show up as 'tesГ¶t' in the database.
And will be displayed as 'tesöt' in the replayer, because HoldemManager (that reads the handhistories) can display these character.

Lyufer
06-18-2011, 11:11 AM
Ok.
But it looks weird, 2 records for 1 player
http://img151.imageshack.us/img151/9714/20110618180524.jpg (http://img151.imageshack.us/i/20110618180524.jpg/)
First is Ok.What about the second ?

Patvs
06-18-2011, 03:14 PM
Can you confirm, if you import ALL original handhistories into a NEW empty database, the player will still show up as

http://img151.imageshack.us/img151/9714/20110618180524.jpg

(two entries for the same player)

Lyufer
06-18-2011, 06:07 PM
Yes I can confirm it.
But I already found the problem and solution.
Some HH files (which I transfered from my second computer) was UTF-8 encoding. It works fine with traditional English characters.
But for correct work with special it need to be UTF-8 with BOM(Byte Order Mark). In that way All nicknames gonna be in right way.

Waiting a cookies from Developes:rolleyes:

How to add BOM to many files (http://www.mind-pioneer.com/services/631_Replace_text_in_multiple_files.html)

Re:Flex
06-20-2011, 08:16 PM
Function "Prefetch one hand" on PokerStars, saves files in ANSI

http://photo.sibnet.ru/upload/imggreat/130860378425.jpg