Just wondering how I can check what character encoding our database is set for?
I really need to move our website from iso-8859-1 to UTF-8, so I need to start by figuring out what the DB is, then testing from there.
Thanks.
Check DB Encoding?
I think this will do it
psql -l -U postgres
List of databases
Name | Owner | Encoding
-----------±---------±----------
benchmark | postgres | SQL_ASCII
matrix | matrix | UTF8
postgres | postgres | SQL_ASCII
template0 | postgres | SQL_ASCII
template1 | postgres | SQL_ASCII
(5 rows)
Ok, our DB is SQL_ASCII. Which, I read really is not an encoding. So, would this mean it is fine to leave the DB as is, and I could be fine with UTF-8?
[quote]
Ok, our DB is SQL_ASCII. Which, I read really is not an encoding. So, would this mean it is fine to leave the DB as is, and I could be fine with UTF-8?
[/quote]
Yes, you can just use UTF8 content in SQL_ASCII, as basically all that means is the database wont barf on invalid UTF8 sequences. In normal usage you wont notice a difference.
[quote]
Yes, you can just use UTF8 content in SQL_ASCII, as basically all that means is the database wont barf on invalid UTF8 sequences. In normal usage you wont notice a difference.
[/quote]
Thanks Justin.
I finished our switch from iso-8859-1 to UTF-8 today. It was actually quite easy using the Find/Replace tool as well as an asset listing to list the content of all pages to see if there were any garbage characters. Plenty of testing done before by cloning assets then forcing UTF-8, but all in all, pretty good for 3 hours of work.
[quote]
I finished our switch from iso-8859-1 to UTF-8 today. It was actually quite easy using the Find/Replace tool as well as an asset listing to list the content of all pages to see if there were any garbage characters. Plenty of testing done before by cloning assets then forcing UTF-8, but all in all, pretty good for 3 hours of work.
[/quote]
…now that one would be good for your community site.
K
[quote]
…now that one would be good for your community site.
K
[/quote]
Did you see issues with the Community site?
[quote]
Did you see issues with the Community site?
[/quote]
No - I meant just switching from the encoding type as a tutorial…
[quote]
No - I meant just switching from the encoding type as a tutorial…
[/quote]
Got it. Could be interesting. Although, I worry other peoples experience with it might not be as easy as mine.