-
Notifications
You must be signed in to change notification settings - Fork 83
Description
An issue was created for this in firebase-functions-python #220, but I believe this is an issue with this project, so I'm creating an issue here.
Issue
My document id:
H67iEkcHx6Nicg5eoZbmxARLyJo2_KoX4bc4jGmTKwSGLI9GBdF46Hbt2_中餐
The last two characters are Chinese characters.
Relevant code:
event.data.after.reference.update() (here)
Error message:
google.api_core.exceptions.NotFound: 404 No document to update: projects/{project_name}/databases/(default)/documents/{collection_name}/H67iEkcHx6Nicg5eoZbmxARLyJo2_KoX4bc4jGmTKwSGLI9GBdF46Hbt2_ä¸é¤�"
Notes
The issue could be that the string "H67iEkcHx6Nicg5eoZbmxARLyJo2_KoX4bc4jGmTKwSGLI9GBdF46Hbt2_中餐" is being converted into "H67iEkcHx6Nicg5eoZbmxARLyJo2_KoX4bc4jGmTKwSGLI9GBdF46Hbt2_\344\270\255\351\244\220" inside the event.data.after.reference.update function. Notably, the part "\344\270\255\351\244\220" is an octal representation of the UTF-8 encoding for 中餐. To convert it, each octal sequence (e.g. \344) can be converted into hexadecimal to get \xe4\xb8\xad\xe9\xa4\x90 which is the UTF-8 byte sequence for 中餐.