Search code examples
unicodegoogle-bigquery

How to enter in a unicode character code in BigQuery?


Let's say I want to use the character 倀:

https://www.fileformat.info/info/unicode/char/20480/index.htm

How would I type this into a query in BigQuery with the proper escape sequence? My thought was the following, but this seems like it's not correct based on the Lexical Structure:

SELECT '倀', '\U00020480'

But obviously that's not correct as I'm getting:

enter image description here

How would I properly type it in with the escape code?


Solution

  • Consider below "hint"

    SELECT '倀', CODE_POINTS_TO_STRING([00020480])    
    

    with output

    enter image description here