ferret icon indicating copy to clipboard operation
ferret copied to clipboard

encoding issue for simple chinese gb2312

Open flazx opened this issue 7 years ago • 2 comments

I need grab a gb2312 encoding html page, such as http://tour.sanya.gov.cn/News.asp, How could I covert the page body data from gb2312 to utf8 in the below code?

LET doc = DOCUMENT("http://tour.sanya.gov.cn/News.asp")

if don't do this. I can't convert the extra json data from gb2312 to UTF8. Any suggestion for this issue?

flazx avatar Oct 08 '18 16:10 flazx

@flazx at this moment Ferret does not have any functions in standard library that would help you to convert the data. Until we get one, you'll need to embed Ferret in a Go application and register your own converter. Here you can see how to extend it.

ziflex avatar Oct 08 '18 16:10 ziflex

@ziflex Can I pick this up?

avinashdhinwa avatar Oct 30 '19 08:10 avinashdhinwa