Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime 15.4 and above
Returns a string in which all invalid UTF-8 byte sequences in strExpr, are replaced by the Unicode replacement character (U+FFFD).
Syntax
make_valid_utf8(strExpr)
Arguments
strExpr: ASTRINGexpression.
Returns
A STRING, consisting of a valid UTF-8 byte sequencea.
Examples
– Simple example taking a valid string as input.
> SELECT make_valid_utf8('Spark')
Spark
– Simple example taking a valid collated string as input.
> SELECT make_valid_utf8('SQL' COLLATE UTF8_LCASE)
SQL
– Simple example taking a valid hexadecimal string as input.
> SELECT make_valid_utf8(x'61')
a
– Example taking an invalid hexadecimal string as input (illegal UTF-8 byte sequence).
> SELECT make_valid_utf8(x'80')
�
- Example taking an invalid hexadecimal string as input (illegal UTF-8 byte sequence).
> SELECT make_valid_utf8(x'61C262')
a�b