Skip to content

If string value is Korean, not English, it returns empty. #920

Closed
@adunStudio

Description

@adunStudio

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2019.4.9f1
  • Firebase Unity SDK version: firebase_unity_sdk_7.0.1
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: Firestore
  • Other Firebase Components in use: Auth
  • Additional SDKs you are using: GPGS (play-games-plugin-for-unity-0.10.12)
  • Platform you are using the Unity editor on: Window
  • Platform you are targeting: Android
  • Scripting Runtime: both mono and il2cpp

[REQUIRED] Please describe the issue here:

If string value is Korean, not English, it returns empty.
When run the app from galaxy note3 or bluestacks...
bluestacks version: 4.240.47.1002
galaxy note3: Android version 5
It does not occur in Unity editors.

Steps to reproduce:

when run an app on galaxy note3 or bluestaks,
If string value is Korean, not English, it returns empty.

Relevant Code:

MemberInfo.cs

using Firebase.Firestore;

public enum MemberState
{
    Normal,
    Ban
}

[FirestoreData]
public class MemberInfo
{
    [FirestoreProperty, ServerTimestamp] public Timestamp LastUpdated { get; set; } = Timestamp.GetCurrentTimestamp();

    [FirestoreProperty] public string Nickname { get; set; };

    [FirestoreProperty] public int Profile { get; set; } = 0;

    [FirestoreProperty] public MemberState MemberState { get; set; } = MemberState.Normal;

    [FirestoreProperty] public string Message { get; set; } = string.Empty;
    
    [FirestoreProperty] public int Level { get; set; } = 1;

    public MemberInfo()
    {
        
    }
}

MemberManager.cs
*** m_MyMemberInfo.Nickname is empty (if Korean) ***

   public void Load(Action succeededAction, Action failedAction)
    {
        Debug.Log("[Load] Member");
        m_CollectionReference = ServerManager.Instance.Firestore.Collection("Member");
        m_DocumentReference = m_CollectionReference.Document(ServerManager.Instance.UserId);
        
        m_DocumentReference.GetSnapshotAsync().ContinueWithOnMainThread(task =>
        {
            if (task.IsCanceled || task.IsFaulted)
            {
                Debug.LogError("[Firebase] LoadMemberInfo False: "+ task.Exception);
                
                failedAction?.Invoke();
                
                return;
            }

            DocumentSnapshot snapshot = task.Result;

            if (snapshot.Exists)
            {
                m_MyMemberInfo = snapshot.ConvertTo<MemberInfo>();
               // m_MyMemberInfo.Nickname is empty (if Korean)
            }
            else
            {
                m_MyMemberInfo = new MemberInfo();
                m_MyMemberInfo.CreateTime = Timestamp.GetCurrentTimestamp();
                
                Save();
            }

            succeededAction?.Invoke();
        });
    }

    public void Save()
    {
        Debug.Log("[Save] Member");

        m_DocumentReference.SetAsync(m_MyMemberInfo, SetOptions.MergeAll);
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions