Some postgresql installations have non-UTF client locale set as default (this is common for multi-charset language envirioments, such as Russian).
Attached patch sets client encoding to UTF8 explicitly
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | pgsql-utf8.patch | 741 bytes | andypost |
| #10 | pgsql-utf8.patch | 751 bytes | andypost |
| #5 | pg_utf8.diff | 793 bytes | andypost |
| drupal-65-pgsql-utf8.diff | 371 bytes | Alex_Tutubalin |
Comments
Comment #1
Alex_Tutubalin commentedComment #2
andypostWorks on 2 live sites!
In database.mysql.inc and database.mysqli.inc
So it's required for postgresql!
Comment #3
gábor hojtsyThanks, committed to Drupal 6. Is this still applicable to Drupal 7? (If not, please put back to "6.x", "fixed").
Comment #4
Crell commentedYes I think it does apply to Postgres on D7 as well. It should be a trivial patch for someone to write. See the new MySQL driver for the one-line example. It should be nearly identical.
Comment #5
andypostD7 patch here
Comment #7
andypostWhat's up? It's so trivial to be erroneus
Comment #9
emi_bcn commentedHi again, Alex!
Any news on it? Will it be introduced to HEAD?
I'll do some testes and rework soon, cause I also think pgsql is much better than mysql. Table corruptions are so common on my site... :(
+Subscribing
Comment #10
andypostSo here re-roll for new DB layer
Comment #11
damien tournoud commentedIn [1], two syntaxes are described:
I would rather go with the standard form, which we use on MySQL already. Either way, this needs work.
[1] http://www.postgresql.org/docs/8.3/static/multibyte.html
Comment #12
andypostso here is SET NAMES as in Mysql
Comment #13
dries commentedI'd like the PostgreSQL maintainers (DamZ or fiasco) to approve this.
Comment #14
damien tournoud commentedMake sense to me, thanks @andypost.
Comment #15
dries commentedCommitted to CVS HEAD. Thanks!