You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 23, 2020. It is now read-only.
I've been running into some issues trying to correctly decode the content of a specific page. The response header says it's utf-8, the page itself says is latin-1. Decoding with utf-8 works when done by hand, but I kept having encoding issues when creating an HTML document with Ji.
I tried a bunch of different NSStringEncodings, most with the same results, which seemed weird. Having a look at Ji's code I found cEncoding to be a null pointer every time so htmlReadMemory() probably defaults to something besides utf-8.
letcEncoding:UnsafePointer<CChar>=CFStringGetCStringPtr(cfEncodingAsString,0)if cEncoding ==nil{print("cEncoding is a null pointer")}
If I hardcode the encoding of the page as a string literal a few lines lower everything seems to be working.
Hey again :)
I've been running into some issues trying to correctly decode the content of a specific page. The response header says it's utf-8, the page itself says is latin-1. Decoding with utf-8 works when done by hand, but I kept having encoding issues when creating an HTML document with Ji.
I tried a bunch of different
NSStringEncoding
s, most with the same results, which seemed weird. Having a look at Ji's code I found cEncoding to be a null pointer every time sohtmlReadMemory()
probably defaults to something besides utf-8.If I hardcode the encoding of the page as a string literal a few lines lower everything seems to be working.
I hope this helps debugging this issue, I don't have much of a clue^^
The text was updated successfully, but these errors were encountered: