public inbox for [email protected]
help / color / mirror / Atom feedBUG #19410: Cannot ser client_encoding
3+ messages / 3 participants
[nested] [flat]
* BUG #19410: Cannot ser client_encoding
@ 2026-02-15 01:53 PG Bug reporting form <[email protected]>
2026-02-15 14:55 ` BUG #19410: Cannot ser client_encoding David G. Johnston <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2026-02-15 01:53 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
The following bug has been logged on the website:
Bug reference: 19410
Logged by: Guest-615695028
Email address: [email protected]
PostgreSQL version: 18.1
Operating system: Microsoft Windows [版本 10.0.26200.7840]
Description:
PS C:\> psql -U postgres
Password for user postgres:
psql (18.1)
Type "help" for help.
postgres=# SHOW client_encoding;
client_encoding
-----------------
GBK
(1 row)
postgres=# SET client_encoding='UTF8';
SET
postgres=# SHOW client_encoding;
client_encoding
-----------------
UTF8
(1 row)
postgres=# \q
PS C:\> psql -U postgres
Password for user postgres:
psql (18.1)
Type "help" for help.
postgres=# SHOW client_encoding;
client_encoding
-----------------
GBK
(1 row)
postgres=#
^ permalink raw reply [nested|flat] 3+ messages in thread
* BUG #19410: Cannot ser client_encoding
2026-02-15 01:53 BUG #19410: Cannot ser client_encoding PG Bug reporting form <[email protected]>
@ 2026-02-15 14:55 ` David G. Johnston <[email protected]>
2026-02-15 15:10 ` Re: BUG #19410: Cannot ser client_encoding Tom Lane <[email protected]>
0 siblings, 1 reply; 3+ messages in thread
From: David G. Johnston @ 2026-02-15 14:55 UTC (permalink / raw)
To: [email protected] <[email protected]>; [email protected] <[email protected]>
On Saturday, February 14, 2026, PG Bug reporting form <
[email protected]> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 19410
> Logged by: Guest-615695028
> Email address: [email protected]
> PostgreSQL version: 18.1
> Operating system: Microsoft Windows [版本 10.0.26200.7840]
> Description:
>
>
Everything you’ve shown worked as expected.
If you want to always use UTF-8 I’d suggest you figure out how to configure
your client to do so. psql will then just auto-detect whatever is actually
in use. It doesn’t really make sense to use SET with client_encoding.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #19410: Cannot ser client_encoding
2026-02-15 01:53 BUG #19410: Cannot ser client_encoding PG Bug reporting form <[email protected]>
2026-02-15 14:55 ` BUG #19410: Cannot ser client_encoding David G. Johnston <[email protected]>
@ 2026-02-15 15:10 ` Tom Lane <[email protected]>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2026-02-15 15:10 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: [email protected] <[email protected]>; [email protected] <[email protected]>
"David G. Johnston" <[email protected]> writes:
> On Saturday, February 14, 2026, PG Bug reporting form <
> [email protected]> wrote:
>> [ SET doesn't persist across sessions ]
> Everything you’ve shown worked as expected.
Indeed. I suggest reading
https://www.postgresql.org/docs/current/config-setting.html
which not only explains that the effects of SET are per-session,
but lists all the other ways to adjust a server setting.
> If you want to always use UTF-8 I’d suggest you figure out how to configure
> your client to do so. psql will then just auto-detect whatever is actually
> in use. It doesn’t really make sense to use SET with client_encoding.
Yeah, that's an orthogonal issue: you really need client_encoding to
match whatever your terminal window is using, or non-ASCII characters
won't display correctly. So letting psql deduce it from environment
is usually the right thing.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-02-15 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-15 01:53 BUG #19410: Cannot ser client_encoding PG Bug reporting form <[email protected]>
2026-02-15 14:55 ` David G. Johnston <[email protected]>
2026-02-15 15:10 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox