我有字符串" %D7%90%D7%A4%D7%A8%D7%AA
"需要翻译成" הרשות לפיתוח הנגב
" (一个简单的谷歌搜索将其作为第一个选项返回)
问题是如何通过Apps脚本或BigQuery内置的东西获得正确的希伯来语拼写。 我已经搜了一会儿,但还没找到任何东西。
答案 0 :(得分:3)
以下是如何在BigQuery中执行此操作的示例,方法是从十六进制代码转换为字节到字符串:
Mix_XFUEL_0.6_XOXID_0.6_PHI_0.2
Mix_XFUEL_0.6_XOXID_0.6_PHI_0.4
Mix_XFUEL_0.6_XOXID_0.6_PHI_0.6
i = '0.5'
fnmatch.fnmatch(file, 'Mix_XFUEL_'i'_XOXID_'i'_PHI_*'):
列的输出为#standardSQL
CREATE TEMP FUNCTION UnescapeString(str STRING) AS (
(SELECT CAST(STRING_AGG(CODE_POINTS_TO_BYTES([CAST(CONCAT('0x', c) AS INT64)]), b'') AS STRING)
FROM UNNEST(SPLIT(str, '%')) AS c
WHERE c != '')
);
WITH Input AS (
SELECT "%D7%90%D7%A4%D7%A8%D7%AA" AS str
)
SELECT str, UnescapeString(str) AS unescaped_str
FROM Input;
。