> Dne ?tvrtek 20. zá?í 2018 18:15:50 UTC+2 Rich napsal(a):
>> > Dne ?tvrtek 20. zá?í 2018 17:31:37 UTC+2 Rich napsal(a):
>> >> > Hi,
>> >> >
>> >> > how can i configure rivet 3.0 to work with utf-8 characters in tcl files?
>> >> >
>> >> > On server, I have this simple page: test.tcl, saved with utf-8 encoding
>> >> >
>> >> > puts {
>> >> > <!DOCTYPE html>
>> >> > <html lang="cs">
>> >> > ...
>> >> > And yet, in browser, if i visit:
http://127.0.0.1/test.tcl
>> >> > The text "Zku?ební ?et?zec" comes garbled.
>> >>
>> >> What happens, if you add this line at the start of your 'test.tcl'
>> >> file?:
>> >>
>> >> fconfigure stdout -encoding utf-8
>> >
>> > Nothing. Text remain garbled.
>> >
>> > I think, stdout channel should be utf-8 configured before test.tcl is
>> > loaded by server. But i dont know where to put it.
>> >
>> > I also tried put it into the BeforeScript directive:
>> >
>> > RivetServerConf BeforeScript "fconfigure stdout -encoding utf-8"
>> >
>> > But it doesn't help either.
>>
>> This suggests then that somewhere within the remainder of the channel
>> between Tcl and the ultimate browser that there is an encoding setting
>> that is not yet set correctly.
>>
>> What http headers does your server offer up when you browse to it?
>
>
> These are headers from Firefox, when i visit my test.tcl page:
Ok, so the utf-8 string ends up in the HTTP headers. After you've