Skip to content

Allow to store in notes unicode, like cyrillic #1005

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

Merged
merged 2 commits into from
Jan 28, 2020

Conversation

volandku
Copy link
Contributor

@volandku volandku commented Oct 3, 2019

bug / improvement

Allow to store in notes unicode, like cyrillic, et cetera

Copy link
Contributor Author

@volandku volandku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space

@noplanman noplanman changed the base branch from master to develop October 24, 2019 19:12
@noplanman
Copy link
Member

@volandku Thanks for your PR!

Does the string not get escaped correctly / what output do you get?
What version of PHP are you using?

json_decode should restore any saved string correctly.

@noplanman
Copy link
Member

@volandku Just pinging again here to ask what exactly isn't working.

If something is off, would be great to have this fixed in the next release 💪

@volandku
Copy link
Contributor Author

volandku commented Nov 4, 2019

Well, I dont remenber for now ))
Seems that result in cyrillic didn`t store at all or stored in wrong format in DB

@noplanman
Copy link
Member

@volandku Ok, thanks for getting back to me.

I'll close this off for now, as I can't reproduce this, but please do open it again with some example code if it happens again to you! 😃

@noplanman noplanman closed this Nov 5, 2019
@VSMent
Copy link

VSMent commented Jan 17, 2020

This is really useful.
Debug, manual db edit or faster manual search are much better now.

@noplanman
Copy link
Member

@VSMent Would you mind elaborating?
I assume you're talking about the change in this PR?

@VSMent
Copy link

VSMent commented Jan 19, 2020

@noplanman Well, actually even after development.
I do not know what are cons of storing data with unescaped unicode. For me understandable cyrillic characters is huge pro.

P.S. What is PR?

@noplanman
Copy link
Member

PR is short for Pull Request.

@VSMent What I meant to ask is, do you also require the change proposed here to be able to store cyrillic characters to the database? If so, could you provide me with a code example that fails so that I can test this and fix it please?

@VSMent
Copy link

VSMent commented Jan 22, 2020

@noplanman Everything works good. But when using PhpStorm or phpMyAdmin to view database tables I do not understand what is written in those cells.
I get "\u0422\u0430\u043A" instead of "Так" → "Yes" in Ukrainian.
It would be preferable for me (and hope for other Cyrillic language developers) to store unicode unescaped.

@noplanman
Copy link
Member

Aaah, I see now, thanks for the explanation 👍

I guess then the only "problem" would be interfaces (for viewing the DB fields) that don't support certain encodings. Not sure if that would actually matter though, as the same would apply in other DB fields like messages or user details with special characters.

@volandku Could you add an entry to the CHANGELOG.md in the "Unreleased" section please?

@noplanman noplanman reopened this Jan 24, 2020
@noplanman noplanman merged commit 6ef14d0 into php-telegram-bot:develop Jan 28, 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.

3 participants