Thanks for that. The implementation of a few functions is missing, for example getAllFields. Before we dive into that, where do you see the question marks? In your database?
If you print one of the fieldLabel values that contains Hindi characters at the beginning of the cloud function, do you see ? too? What about after you call getAllFields?
Let's try to narrow down where the ? first appear, that will help us determine what causes it.
Given that you have the same problem with the data you receive in the request body, this is likely an issue with how the sender encodes the data.
I wrote a very basic Cloud Function with the following code. (Note: you seem to use Firebase Functions, I didn't test that but don't expect that to be the cause of the problem you see):
Thanks for that. The implementation of a few functions is missing, for example
getAllFields
. Before we dive into that, where do you see the question marks? In your database?If you print one of the
fieldLabel
values that contains Hindi characters at the beginning of the cloud function, do you see?
too? What about after you callgetAllFields
?Let's try to narrow down where the
?
first appear, that will help us determine what causes it.I found this question on stackoverflow
stackoverflow.com/questions/605618...
I logged
_request.body
at the start of the function.Having the same problem.
Given that you have the same problem with the data you receive in the request body, this is likely an issue with how the sender encodes the data.
I wrote a very basic Cloud Function with the following code. (Note: you seem to use Firebase Functions, I didn't test that but don't expect that to be the cause of the problem you see):
I called it with the following command from the terminal:
The log output is: dev-to-uploads.s3.amazonaws.com/i/...
Ok thanks..
I'll do some testing and will let you know
Try a most basic command with
curl
like in my example. Keep me posted, I'll see what I can do to help you troubleshoot this.The problem was with the data I was receiving from webhook :D
Nice find, thanks for sharing. It makes sense given you already saw question marks when you logged the request body. Glad you've resolved that.