problem patch: http://archives.postgresql.org/pgadmin-hackers/2009-01/msg00166.php
with this patch cyrillic logs displayed incorrectly.
revert some lines from it fix problem:
- wxString str;
- if (wxString(wxString(raw,wxConvLibc),wxConvUTF8).Len() > 0)
- str = line + wxString(wxString(raw,wxConvLibc),wxConvUTF8);
- else
- str = line + wxTextBuffer::Translate(wxString(raw, set->GetConversion()), wxTextFileType_Unix);
+ wxString str = line + wxTextBuffer::Translate(wxString(raw, set->GetConversion()), wxTextFileType_Unix);
i can't understand what is going on here:
wxString(wxString(raw,wxConvLibc),wxConvUTF8)
but without it - log loaded with correct encoding.
test locale settings:
cp1251=# select name, setting from pg_settings where name like 'lc_%' or name like '%encod%';
name | setting
-----------------+--------------
client_encoding | WIN1251
lc_collate | ru_RU.CP1251
lc_ctype | ru_RU.CP1251
lc_messages | ru_RU.CP1251
lc_monetary | ru_RU.CP1251
lc_numeric | ru_RU.CP1251
lc_time | ru_RU.CP1251
server_encoding | WIN1251
cp1251@seb:~$ locale
LANG=ru_RU.CP1251
LC_CTYPE="ru_RU.CP1251"
LC_NUMERIC="ru_RU.CP1251"
LC_TIME="ru_RU.CP1251"
LC_COLLATE="ru_RU.CP1251"
LC_MONETARY="ru_RU.CP1251"
LC_MESSAGES="ru_RU.CP1251"
LC_PAPER="ru_RU.CP1251"
LC_NAME="ru_RU.CP1251"
LC_ADDRESS="ru_RU.CP1251"
LC_TELEPHONE="ru_RU.CP1251"
LC_MEASUREMENT="ru_RU.CP1251"
LC_IDENTIFICATION="ru_RU.CP1251"
LC_ALL=
--
Sergey Burladyan