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

BUG: It's not saving Kurdish or Alphabetic characters properly #258

Open
Xoshbin opened this issue Jul 22, 2020 · 0 comments
Open

BUG: It's not saving Kurdish or Alphabetic characters properly #258

Xoshbin opened this issue Jul 22, 2020 · 0 comments

Comments

@Xoshbin
Copy link

Xoshbin commented Jul 22, 2020

When creating a new conversation and trying to update the conversation title and description, all the characters are separated by slashes:

"data": [
        {
            "id": 217,
            "conversation_id": 217,
            "messageable_id": 2,
            "messageable_type": "App\\User",
            "settings": null,
            "created_at": "2020-07-22T23:04:50.000000Z",
            "updated_at": "2020-07-22T23:05:22.000000Z",
            "private": 1,
            "direct_message": 1,
            "data":"{\"title\":\"\ل\ا\ن\س\ه \ر \م\ه \ك\ي\ن\ه \ق\ر\ش \٢\٠ \ا\و\ت\و\م\ا\ت\ي\ك  \س\ب\ي \ب\ف\ر \ي\",\"description\":\"\ل\ا\ن\س\ه \ر \م\ه \ك\ي\ن\ه \ق\ر\ش \٢\٠ \ا\و\ت\و\م\ا\ت\ي\ك  \س\ب\ي \ب\ف\ر \ي\"}",
            "conversation": {

To Reproduce
Make a new conversation, then update it's title and description with an alphabetic characters like Kurdish or Arabic.

$data = ['title' => 'بە فەرمی مباپێ داهاتووی خۆی یەكلایی كردەوە', 'description' => 'بە فەرمی مباپێ داهاتووی خۆی یەكلایی كردەوە'];
$conversation = Chat::createConversation($participants)->makeDirect();
$conversation->update(['data' => $data]);

Expected behavior
Expected to save the data without slashes just like below when returned from json resource:

"data": [
        {
            "id": 217,
            "conversation_id": 217,
            "messageable_id": 2,
            "messageable_type": "App\\User",
            "settings": null,
            "created_at": "2020-07-22T23:04:50.000000Z",
            "updated_at": "2020-07-22T23:05:22.000000Z",
            "private": 1,
            "direct_message": 1,
            "data":"{\"title\":\"بە فەرمی مباپێ داهاتووی خۆی یەكلایی كردەوە\",\"description\":\"بە فەرمی مباپێ داهاتووی خۆی یەكلایی كردەوە\"}",
            "conversation": {

Screenshots
Screenshot from PhpMyAdmin:
https://prnt.sc/tmvzri

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

No branches or pull requests

1 participant