Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unscape for macos #84

Merged
merged 6 commits into from
Jul 23, 2020
Merged

Add unscape for macos #84

merged 6 commits into from
Jul 23, 2020

Conversation

ospfranco
Copy link
Contributor

In response to comment on #82

This was referenced Jul 16, 2020
@craftzdog
Copy link
Owner

Sorry for the slow response.
Check out how to test it: #82 (comment)

@ospfranco
Copy link
Contributor Author

Screenshot 2020-07-22 at 08 52 45

Ran the test inside my app, it doesn't crash, but the output is not quite the same as the screenshot you sent, is this correct?

@ospfranco
Copy link
Contributor Author

if I remove the escaping/unescaping completely for macos, then it renders correctly, but then I'm not sure if I will face #51 again.

Screenshot 2020-07-22 at 09 05 36

I guess for now I can remove the escaping/unescaping and see what happens, and if necessary open another PR

@craftzdog
Copy link
Owner

Seems like macOS Text component behaves differently.
In the second screenshot, I suspect that it dropped "\u0000Null" in the database, so I guess escaping nulls is necessary.

I updated the test to stringify data as JSON so that we can see the exact data: 7b13833

If it stored/read data properly, you should be able to see "Zero\u0000Null" like so:

Screen Shot 2020-07-22 at 18 14 04

@ospfranco
Copy link
Contributor Author

This is what I see with escaping/unescaping enabled:

Screenshot 2020-07-22 at 14 14 03

this is without escaping/unescaping, sometimes it looks like it hangs:

Screenshot 2020-07-22 at 14 15 16

and sometimes it finishes:

Screenshot 2020-07-22 at 14 16 14

@ospfranco
Copy link
Contributor Author

ospfranco commented Jul 22, 2020

Actually they both hang sometimes and do not load all the output of the list, but with escaping I can see Zero\u0000Null string, so I guess escaping is necessary after all?

@craftzdog
Copy link
Owner

Right. Can you respect formatting?
Now escapeForIOSAndAndroid is not a proper name, btw.

@ospfranco
Copy link
Contributor Author

how about now?

@craftzdog
Copy link
Owner

Thanks, LGTM!

@craftzdog craftzdog merged commit 440f85f into craftzdog:master Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants