Skip to content

Conversation

@ahnse0
Copy link

@ahnse0 ahnse0 commented Dec 26, 2025

It is made for Koreans.
The characters are normally represented on websites that use euc-kr instead of the default utf-8

Copy link
Owner

@bogdanfinn bogdanfinn left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution. really appreciate it.

I left some comments for minor improvements.


c.logger.Debug("response body payload: %s", finalResponse)

resp.Body = responseBody
Copy link
Owner

Choose a reason for hiding this comment

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

you need to set the finalResponse here or am i wrong?

Copy link
Author

Choose a reason for hiding this comment

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

It's a log to check if it's encoded normally

c.logger.Debug("response body payload: %s", string(buf))
finalResponse := string(buf)

if c.config.euckrResponse {
Copy link
Owner

Choose a reason for hiding this comment

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

your korean encoding transformation is only happening in debug here (check line 383)
I think what you want is to do it always and transform the resp.Body if the option for euckr response is enabled

Copy link
Author

Choose a reason for hiding this comment

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

That's right, actually I'm using the client in typescript, and the library is already encoding and transferring body values normally

I'm not used to golang because I don't use it professionally
As you said, if the euckr option is enabled, it should always be reflected in the result

Copy link
Owner

Choose a reason for hiding this comment

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

@ahnse0 do you have an example url which i can use for testing your change if everything works?

Copy link
Author

Choose a reason for hiding this comment

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

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