Trouble installing OTRS 3.0.6 onto CentOS 5.5 / Postgres 8.4: otrs-initial_insert.postgresql.sql contains ISO 8859 data, but database encoding is UTF8

Hi. I'm trying to install OTRS 3.0.6, and, as the Web-based installer
does not support Postgres,
I am following README.database.
My database is Postgres 8.4 (on CentOS 5.5).
I've created the database: createdb --encoding=utf8 --owner=otrs otrs
But when I run the initial insert file, it bombs out because it is ISO
8859 encoded, not UTF8.
# psql otrs < scripts/database/otrs-initial_insert.postgresql.sql
...
HINT: Use the escape string syntax for escapes, e.g., E'\r\n'.
INSERT 0 1
ERROR: invalid byte sequence for encoding "UTF8": 0xeb7363
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".
WARNING: nonstandard use of escape in a string literal
LINE 3: ...et gaat escaleren (

Why not use MySQL? Best Regards, Muhammad El-Sergani. On Tue, Mar 29, 2011 at 11:10 PM, Aleksey Tsalolikhin < atsaloli.tech@gmail.com> wrote:
Hi. I'm trying to install OTRS 3.0.6, and, as the Web-based installer does not support Postgres, I am following README.database.
My database is Postgres 8.4 (on CentOS 5.5).
I've created the database: createdb --encoding=utf8 --owner=otrs otrs
But when I run the initial insert file, it bombs out because it is ISO 8859 encoded, not UTF8.
# psql otrs < scripts/database/otrs-initial_insert.postgresql.sql ... HINT: Use the escape string syntax for escapes, e.g., E'\r\n'. INSERT 0 1 ERROR: invalid byte sequence for encoding "UTF8": 0xeb7363 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". WARNING: nonstandard use of escape in a string literal LINE 3: ...et gaat escaleren (
)', 'Beste Let's check the encoding: # file scripts/database/otrs-initial_insert.postgresql.sql scripts/database/otrs-initial_insert.postgresql.sql: ISO-8859 English text, with very long lines, with CR, LF line terminators #
I then tried to regenerate the SQL file from the XML file, following the instructions in the README.database, but the resulting SQL file contained ISO-8859 encoded text.
Please advise. I'm trying to get a clean load of scripts/database/otrs-initial_insert.postgresql.sql
Thanks, Aleksey --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

I ended up using "iconv -f ISO8859-1 -t UTF-8" on scripts/database/otrs-initial_insert.postgresql.sql Aleksey

You found exactly the workaround:
http://bugs.otrs.org/show_bug.cgi?id=6718#c4
BTW it might LOOK as if there are a lot of issues when doing the
insert but actually it's warnings (that are WARNINGS, non-fatal) ande
also just one error, in inserting a Dutch notification with a strange
character 'é'.. chances you need Dutch notifications if your name is
Aleksey Tsalolikhin are pretty slim I guess.
And with iconv you actually have ALL the notifications in the system afterwards.
--
Mike
On Wed, Mar 30, 2011 at 2:07 AM, Aleksey Tsalolikhin
I ended up using "iconv -f ISO8859-1 -t UTF-8" on scripts/database/otrs-initial_insert.postgresql.sql
Aleksey --------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (3)
-
Aleksey Tsalolikhin
-
Michiel Beijen
-
Muhammad El-Sergani