我已经写在PL/Perl的这个存储过程没有相应:的PostgreSQL:编码“UTF8”字符在“LATIN1”在plperl存储过程
CREATE FUNCTION strip_html_tags(text) RETURNS TEXT AS $$
use HTML::Strip;
my $hs = HTML::Strip->new();
my $clean_text = $hs->parse($_[0]);
$hs->eof;
return $clean_text;
$$ LANGUAGE plperlu;
我有我的数据库中的某些字段(LATIN1 encodend ),可能有一些无效字符,因为我得到的东西,如:
db=# select strip_html_tags(field) from table;
ERROR: character 0xe2809c of encoding "UTF8" has no equivalent in "LATIN1"
CONTEXT: PL/Perl function "strip_html_tags"
我使用PostgreSQL的转换()和convert_from()来尝试更改编码,但没有任何运气尝试。有任何想法吗?
在此先感谢。