Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: cynwoody

You’re right, I lapsed. The BOM helps to designate byte order — duh...

Still yet, how does one know if the stream is ANSI or UTF-8 until things get weird? At least with UTF-16+, the ANSI stream dies after the first character.


56 posted on 01/19/2016 2:41:44 AM PST by Gene Eric (Don't be a statist!)
[ Post Reply | Private Reply | To 55 | View Replies ]


To: Gene Eric
Still yet, how does one know if the stream is ANSI or UTF-8 until things get weird?

The server informs the browser how the page is encoded via the Content-Type header, e.g.,

Cache-Control:private
Connection:close
Content-Type:text/html; charset=utf-8
Date:Tue, 19 Jan 2016 16:45:16 GMT
Server:nginx/1.2.4
Transfer-Encoding:chunked

There are other possible values for the charset, but UTF-8 is taking over, because it just works.


57 posted on 01/19/2016 2:55:41 AM PST by cynwoody
[ Post Reply | Private Reply | To 56 | View Replies ]

To: Gene Eric

It’s not hard—if the first bit is set, it’s a multibyte character.


62 posted on 01/19/2016 4:21:57 AM PST by dinodino
[ Post Reply | Private Reply | To 56 | View Replies ]

To: Gene Eric

https://www.w3.org/International/O-HTTP-charset


64 posted on 01/19/2016 7:23:38 AM PST by smokingfrog ( sleep with one eye open (<o> ---)
[ Post Reply | Private Reply | To 56 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson