Annotation of parser3/tests/344.html, revision 1.3
1.1 moko 1: @main[]
2: ^from-1251[]
3:
4: $f1[^file::load[binary;247_utf8_bom.txt]]
5: ^show[f1;$f1]
6:
7: $f[^file::create[$f1; $.mode[text] ]]
8: ^show[f text from binary, automatic transcode by UTF-8 preambule;$f]
9:
1.2 moko 10: $f[^file::create[$f1; $.mode[text] $.content-type[text/plain^; charset=Windows-1251] ]]
11: ^show[f text from binary no transcode as charset specified in content-type;$f]
12:
13: $f[^file::create[$f1; $.mode[text] $.from-charset[Windows-1251] ]]
14: ^show[f text from binary no transcode as from-charset specified;$f]
15:
16: $f1[^file::load[binary;247_utf8.txt]]
17: ^show[f1;$f1]
18:
19: $f[^file::create[$f1; $.mode[text] ]]
20: ^show[f text from binary, no transcode;$f]
21:
22: $f[^file::create[$f1; $.mode[text] $.from-charset[UTF-8] ]]
23: ^show[f text from binary transcode using from-charset;$f]
24:
1.3 ! moko 25: ^try-catch{ ^file::create[$f1; $.to-charset[UTF-8] $.charset[UTF-8] ] }
! 26:
1.1 moko 27: @show[title;f]
1.3 ! moko 28: $title : {
! 29: "name":"$f.name",
! 30: "size":$f.size,
! 31: "mode":"$f.mode",
! 32: "content-type":"^taint[json;$f.content-type]",
! 33: "text":"$f.text"
! 34: }
E-mail: