![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
On Tue, 10 Oct 2006, Tom Lane wrote: "Sergiy Vyshnevetskiy" <serg (AT) vostok (DOT) net> writes: Convert server messages to database charset. This has been discussed before: http://archives.postgresql.org/pgsql...8/msg00245.php The magic pg_enc2iananame_tbl[] you reference in your patch does not exist, and if it did exist it wouldn't work on all platforms, since encoding names aren't sufficiently well standardized :-( It's not magic, it's from ICU patch. Want me to send you a copy? ![]() |
#2
| |||
| |||
|
|
On Tue, 10 Oct 2006, Sergiy Vyshnevetskiy wrote: On Tue, 10 Oct 2006, Tom Lane wrote: "Sergiy Vyshnevetskiy" <serg (AT) vostok (DOT) net> writes: Convert server messages to database charset. This has been discussed before: http://archives.postgresql.org/pgsql...8/msg00245.php The magic pg_enc2iananame_tbl[] you reference in your patch does not exist, and if it did exist it wouldn't work on all platforms, since encoding names aren't sufficiently well standardized :-( It's not magic, it's from ICU patch. Want me to send you a copy? ![]() Sorry. I thought it was more well-known. Just looked into gentoo portage - they don't know about it eigther. The patch is here: http://people.freebsd.org/~girgen/po...-09-25.diff.gz This is the current list of encodings, according to iana: http://www.iana.org/assignments/character-sets |
#3
| |||
| |||
|
|
"Sergiy Vyshnevetskiy" <serg (AT) vostok (DOT) net> writes: Convert server messages to database charset. This has been discussed before: http://archives.postgresql.org/pgsql...8/msg00245.php The magic pg_enc2iananame_tbl[] you reference in your patch does not exist, and if it did exist it wouldn't work on all platforms, since encoding names aren't sufficiently well standardized :-( |

|
This, however, uncovers another bug: PostgreSQL dumps the messages into stderr/syslog as-is, without converting database data from database charset to charset from LC_MESSAGES. I'm quite unconvinced that that's a bug. If we tried to do a conversion here, it would be trivial to set up denials of service for logging --- just include a character in a comment in your SQL command that cannot be converted to the LC_MESSAGES character set. |
#4
| |||
| |||
|
|
Sergiy Vyshnevetskiy <serg (AT) vostok (DOT) net> writes: It's not magic, it's from ICU patch. Want me to send you a copy? ![]() You're missing my point, which is that non-ICU locale support doesn't necessarily recognize the same encoding names. We would have done this years ago if we had a solution to that problem. |
#5
| |||
| |||
|
|
Here is a new and improved patch, that closes security hole as well. |
![]() |
| Thread Tools | |
| Display Modes | |
| |