Encoding in LC server - the final piece of the puzzle
neville.smythe at optusnet.com.au
Sat Sep 16 19:56:36 EDT 2023
> did you try:
> put header "Content-Type: text/html; charset=" & quote & "UTF-8" & quote
> before sending the output to the client?
That sounds exactly like the incantation I needed.
But I can’t get it to work.
The first 3 lines of my webPage.lc <http://webpage.lc/> file are
<?lc put header "Content-Type: text/html; charset=" & quote & "UTF-8" & quote ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
(Not sure that 3rd line is necessary with HTML5, but presumably it couldn’t hurt)
The header suggested just seems to be ignored when LC Server sends the output to Apache. (Tried it with “put new header…” too after I found some documentation for the magic spell.)
The default setting for Apache on Dreamhost is naturally the native encoding ISO-8859-1.(Is there any way to override that with htaccess, since all my WordPress pages are served as utf-8 already?)
More information about the use-livecode