我尝试将特殊字符“†”与 psql 添加到 varchar 字段,但没有成功。从 php 应用程序它可以工作(php 用户为 iso8859-1)。
db 的设置是:
encoding = LATIN1
collation = fi_FI
character type = fi_FI
client both UTF8 & LATIN1 (on commandline PGCLIENTENCODING=LATIN1 or PGCLIENTENCODING=UTF8)
从表中选择显示客户端何时为 UTF8
locationx \u0086
如何将值从 psql 添加到数据库?以下都不起作用。
update tablex set field1 = 'locationY' || '†'
update tablex set field1 = 'locationY' || U&'\86'
给出错误信息。
ERROR: character with byte sequence 0xe2 0x80 0xa0 in encoding "UTF8" has no equivalent in encoding "LATIN1"
ERROR: invalid Unicode escape value at or near "\86' "
如果我查看我的 PHP 应用程序\x6c6f636174696f6e5986输入的数据,字节是,但是当我输入数据时psql,字节是\x6c6f636174696f6e59e280a0.
慕桂英3389331