1. 程式人生 > >PostgreSQL 字串操作函式[轉]

PostgreSQL 字串操作函式[轉]

函式:convert(string bytea, src_encoding name, dest_encoding name) 
說明:Convert string to dest_encoding. The original encoding is specified by src_encoding. The string must be valid in this encoding. Conversions can be defined by CREATE CONVERSION. Also there are some predefined conversions. See Table 9-7 for available conversions. 轉換字串編碼,指定源編碼與目標編碼
例子:convert('text_in_utf8', 'UTF8', 'LATIN1') = text_in_utf8 represented in ISO 8859-1 encoding