0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

DBD::Pgのインストール時のエラー

Posted at

DBD::Pgをインストールする時にエンコーディングのエラーが発生した

t/12placeholders.t .. 71/243 
#   Failed test 'Dollar quotes with valid characters are parsed as identifiers'
#   at t/12placeholders.t line 609.
#          got: 'DBD::Pg::st execute failed: ERROR:  invalid byte sequence for encoding "EUC_JP": 0xe58c at t/12placeholders.t line 606.
# '
#     expected: ''

#   Failed test 'Dollar quotes with valid characters are parsed as identifiers'
#   at t/12placeholders.t line 609.
#          got: 'DBD::Pg::st execute failed: ERROR:  invalid byte sequence for encoding "EUC_JP": 0xe58c at t/12placeholders.t line 606.
# '
#     expected: ''

#   Failed test 'Dollar quotes with valid characters are parsed as identifiers'
#   at t/12placeholders.t line 609.
#          got: 'DBD::Pg::st execute failed: ERROR:  invalid byte sequence for encoding "EUC_JP": 0xe58c at t/12placeholders.t line 606.
# '
#     expected: ''
DBD::Pg::db do failed: ERROR:  current transaction is aborted, commands ignored until end of transaction block at t/12placeholders.t line 618.
  • client_encodingがEUC-JPになっていることが原因であった。
t/01connect.t ....... 15/15 # 
# DBI                         Version 1.63
# DBD::Pg                     Version 2.19.3
# Perl                        Version 5.18.1
# OS                          freebsd
# PostgreSQL (compiled)       90102
# PostgreSQL (target)         90102
# PostgreSQL (reported)       PostgreSQL 9.1.2 on amd64-portbld-freebsd9.0, compiled by cc (GCC) 4.2.1 20070831 patched [FreeBSD], 64-bit
# Default port                5432
# DBI_DSN                     dbi:Pg:db="postgres"
# DBI_USER                    pgsql
# Test schema                 dbd_pg_testschema
# LANG                        C
# array_nulls                 on
# backslash_quote             safe_encoding
# client_encoding             EUC_JP
# server_encoding             EUC_JP
# standard_conforming_strings on
# Adjusted:                   DBI_DSN DBI_USER
  • どこで設定されているのか判らなかったが、export PGCLIENTENCODING=UNICODE してインストールするとうまくいった。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?