Search code examples
c#azure-functionstext-to-speechssmlphoneme

Phoneme from Jsonstream unrecognized in c#


I have a little problem with my JsonStream in C#

I am reading a Json Blob in my Storage with this inside:

{"id":"275177", "fremdwort":"1.FFC-Frankfurt", "ipa":"ʹeːɐ̯stɐ ɛf ɛf ʦeː ʹfraŋkfʊrt"}

in C#:

 while (Jsonreader.Read())
                        { if (Jsonreader.TokenType == JsonToken.StartObject)
                            {
                                var record = serializer.Deserialize<JsonClass>(Jsonreader);
                                log.LogInformation(record.Id.ToString() +" , "+ record.Fremdwort +" , "+ record.Ipa);

If I log my JsonStreamer I receive this:

[2021-03-04T13:30:51.367Z] 275177 , 1.FFC-Frankfurt , ´e???st? ?f ?f ?e? ´fra?kf?rt

I am missing something to encode this questionmarks, What would be the solution to receive the right string without the ???.

Thank you stranger !


Solution

  • I don't think it is a serious problem. I test it in my side, and the mess code ??? only occur when we run the function in Visual Studio in local. And it just shows in logs. If we output it in responseMessage(like below screenshot), it will not show ??? in output.

    enter image description here

    enter image description here

    And if we run the function on azure portal, it also will not show mess code ???. No matter in logs or in output. enter image description here

    So we do not need to worry about that, the mess code ??? show in local logs may caused by coding problem of logs console.