SMF Support > PostgreSQL and SQLite Support
2.0 b3.1 + postgresql encoding issue
(1/1)
cybernd:
Running 2.0 beta 3.1 with postgresql 8.3.
Whenever i try to post something containing chars like umlauts it leads to an database error.
The following database is the result of trying to post an 'ΓΌ' inside the message body.
--- Quote ---ERROR: invalid byte sequence for encoding "UTF8": 0xfc
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
File: /home/www/org.jorona.forum/Sources/Subs-Post.php
Line: 1804
--- End quote ---
Im sure that client_encoding contains "UTF8" when the insert statement is executed.
The pg database itself was created with the UTF8 enconding setting.
Any ideas?
thx
Bernhard
Oldiesmann:
What do you have $db_charset set to in Settings.php, and what's your SMF character set?
cybernd:
Per default the $db_charset does not even exist inside Settings.php.
But i already heared about this variable because someone told me about it in the IRC channel.
So i tried to add it with different settings, but none of them changed anything.
i tried the following values: 'utf8', 'UTF8', 'utf-8', 'UTF-8', 'ISO-8859-1'
Im not even sure if the db_charset is used inside 2.0 beta 3.1, because all occourences seem to be only used inside the maintenence section.
thx,
Bernhard
Oldiesmann:
It's actually $db_character_set, not $db_charset as I initially stated.
Try adding this to Settings.php:
--- Code: ---$db_character_set = "'UTF8'";
--- End code ---
The double quotes are needed because SMF doesn't pass the value as a string (see the reloadSettings function in Sources/Load.php).
Navigation
[0] Message Index
Go to full version