Jump to content

Charset issue while create note with AppleScript


Recommended Posts

Im trying to clip some pages to notes with AppleScript. Sample code here : 

tell application "Evernote"
	create note from url "http://www.dapenti.com/blog/more.asp?name=xilei&id=126913"
	create note from url "http://www.jianshu.com/p/fb97b21aeb1d"
end tell

then I get a note with messy code  and a good note.

I notice the first url's http response header "Content-Type:text/html" and in its html tag <meta http-equiv='content-type' content='text/html; charset=gb2312' />

the second url's http response header "Content-Type:text/html; charset=utf-8" and tag <meta charset="utf-8"> 

Maybe when the evernote applescript api  can't detect charset from http header, it use some default value like 'utf-8',  that make the note messy code.

Is there any resolution now? 

Maybe detect charset from html tag? or provide an extra parameter "charset"  to  "create note from url" api ?

(Chrome Evernote Clipper extension doing the job pretty good)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...