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

Non-alphabetical texts like korean get crashed #10

Closed
zero734kr opened this issue Apr 1, 2021 · 1 comment · Fixed by #11
Closed

Non-alphabetical texts like korean get crashed #10

zero734kr opened this issue Apr 1, 2021 · 1 comment · Fixed by #11
Labels
bug Something isn't working released

Comments

@zero734kr
Copy link
Contributor

zero734kr commented Apr 1, 2021

# original text:
- 타락한 그림자의 반지
# when petitio parses it:
+ í\x83\x80ë\x9D½í\x95\x9C 그림ì\x9E\x90ì\x9D\x98 ë°\x98ì§\x80

Using petitio v1.1.0

When I request to this url, petitio is returning something like:

{
    "ItemInfo": {
        "AcquisitionInfo": {
            "Acquisition_000": [
                null
            ]
        },
        "BasicInfo": {
            "Tooltip_Item_000": [
                null
            ],
            "categoryName": "<FONT COLOR='#FA5D00'>ì ë¬¼ ë°</FONT>",
            "categoryType": "200",
            "enhance": "false",
            "itemId": "212300022",
            "itemLevel": 
                           ì
 ë ë²¨ 960",
            "itemName": "íë 그림ì",
            "maxQualityIndex": "0",
            "minQualityIndex": "0",
            "setItem": "false"
        }
    }
}

but the expected output was:

{
    "ItemInfo": {
        "AcquisitionInfo": {
            "Acquisition_000": [
                null
            ]
        },
        "BasicInfo": {
            "Tooltip_Item_000": [
                null
            ],
            "categoryName": "<FONT COLOR='#FA5D00'>유물 반지</FONT>",
            "categoryType": "200",
            "enhance": "false",
            "itemId": "212300022",
            "itemLevel": "아이템 레벨 960",
            "itemName": "타락한 그림자의 반지",
            "maxQualityIndex": "0",
            "minQualityIndex": "0",
            "setItem": "false"
        }
    }
}

It seems while parsing buffer to json, something is causing to crash non-alphabetical letters like korean.

Code to reproduce:

import fetch from "petitio"

fetch("https://ludy.game.onstove.com:44333/web/ItemDictionary/Select/212300022?_=1617310085179").json().then(console.log)

I'm using nodejs v14.16.0 with linux mint 20.1.

@github-actions
Copy link

github-actions bot commented Apr 7, 2021

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants