I'm trying to crawl the php web, but the page is euc-kr.

Asked 2 years ago, Updated 2 years ago, 65 views

I want to parse data from a web page with php, but the encoding method of the page is euc-kr. So if you crawl the contents, the Korean alphabet will be broken, is there a way to solve it?

php web

2022-09-21 19:01

1 Answers

I searched and found a way to solve it with iconv function.

$string="Hangul";
iconv("euc-kr", "utf-8", $string);


2022-09-21 19:01

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.