Re: do all browsers support UTF-8 encoding???

From: Michael \(michka\) Kaplan (michka@trigeminal.com)
Date: Thu Oct 05 2000 - 14:07:54 EDT


Well, I actually give two workarounds for getting UTF-8 working on IIS 4.0:

1) Install the Option Pack after the Service Pack (circumvents the Microsoft
"turn off the evil UTF-8" fix!)

2) Convert it yourself and then use Response.BinaryWrite (the Microsoft
method that says "leave my @*^$ string alone!")

It was over a year before my ISP finally agreed to cohost the server and
move to Windows 2000.... so I had to be quite inventive to get languages
like Hindi to work properly! :-)

michka

Michael Kaplan
Trigeminal Software, Inc.
http://www.trigeminal.com/

----- Original Message -----
From: "Paul Deuter" <Paul.Deuter@plumtree.com>
To: "Unicode List" <unicode@unicode.org>
Sent: Thursday, October 05, 2000 10:22 AM
Subject: RE: do all browsers support UTF-8 encoding???

> Isn't this solution only viable for some web servers?
> Michael Kaplan's article in MSDN (July 2000) says that older
> versions of Microsoft IIS will not support UTF-8 and/or
> UTF-16.
>
> Thanks,
> Paul
>
> Paul Deuter
> paul.deuter@plumtree.com
>
>
> -----Original Message-----
> From: addison@inter-locale.com [mailto:addison@inter-locale.com]
> Sent: Thursday, October 05, 2000 8:45 AM
> To: Unicode List
> Cc: Unicode List
> Subject: Re: do all browsers support UTF-8 encoding???
>
>
> Hi Sandeep,
>
> I am horrified that you would even CONSIDER separate middle tiers or
> separate web servers a "solution".
>
> I guess this concept is hard to understand. What I said was:
>
> Build your pages as UTF-8 or UTF-16 and convert them in one pass to a
> legacy code set. Internally your servers are working entirely in Unicode,
> and for modern browsers you can deliver the UTF-8 page directly. For older
> browsers, convert the page and send it.
>
> Now this sounds complex, but in JSP (you were using JSP, right?) it's as
> easy as adding this line to the top of your localized JSP file:
>
> <%@ page contentType="text/html; charset=Big5" %>
>
> That is ALL you have to do to deliver the page as Big5. Java uses UTF-16
> internally, so you can pass in Unicode data (in the form of Strings) and
> talk to middle tier systems in Unicode (in the form of Strings).
>
> Now implementing a flexible approach is harder. I advocate using XSL to
> achieve this result. You'll have tags in your XSL stylesheet that look
> something like this:
>
> <xsl:choose>
> <xsl:when userAgentOkay==1>
> <xsl:directive.page contentType='text/html; charset=utf-8'/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:directive.page contentType=legacyCharset />
> </xsl:otherwise>
> </xsl:choose>
>
> So, let's review:
>
> 1. Do NOT use legacy charsets internal to your servers.
> 2. Generate your pages as Unicode (UTF-16 or UTF-8).
> 3. Convert the assembled page to a legacy charset if-and-only-if the
> userAgent is an older browser.
>
> Thanks,
>
> Addison
>
> ===========================================================
> Addison P. Phillips Principal Consultant
> Inter-Locale LLC http://www.inter-locale.com
> Los Gatos, CA, USA mailto:addison@inter-locale.com
>
> +1 408.210.3569 (mobile) +1 408.904.4762 (fax)
> ===========================================================
> Globalization Engineering & Consulting Services
>
> On Thu, 5 Oct 2000, Sandeep Krishna wrote:
>
> > hi...
> >
> > well.. as per ur suggestion.. i shouldnt send in UTF-8 coded text...
> > and instead should send in text in local scripts (Big5, GB..., Shift-JIS
> > etc.. )
> >
> > but doesnt that implicitly imply that i need to have a separate middle
> tier
> > support for each locale...
> > that is i dedicate separate Web Servers specfically meant for a
particular
> > locale....(that is it only writes and reads to the DB server on a
> > particualar encoding ..say. Big5)
> >
> > but my kindof set up doesnt permit me the liberty of separate Web
Servers
> > for separate locales.....(Business Rules.)
> >
> > so i dont think that solution hold valid for my case....
> > any elaborations/clarifications.....
> >
> > regards,
> >
> > Sandeep
> >
> >
> > ----- Original Message -----
> > From: <addison@inter-locale.com>
> > To: Unicode List <unicode@unicode.org>
> > Cc: Unicode List <unicode@unicode.org>
> > Sent: Wednesday, October 04, 2000 10:22 PM
> > Subject: Re: do all browsers support UTF-8 encoding???
> >
> >
> > Hi Sandeep,
> >
> > Maybe this wasn't clear, but...
> >
> > IE 2,3,4.x and Netscape 2, 3, and 4.x will not display Chinese
characters
> > using the UTF-8 encoding as installed. They set the font for the UTF-8
> > encoding to "Times New Roman" and therefore display black squares (the
> > "empty glyph") for all Chinese characters.
> >
> > A lot of us think that you should not send UTF-8 to the browser if you
are
> > concerned about having large numbers of people with older browser
versions
> > (and cannot ensure that they all set the font to something more
> > approprite, i.e. in a controlled environment such as an intranet). This
> > appears to be your case.
> >
> > Short story:
> >
> > Work in Unicode (your choice, UTF-8 or UTF-16) at the server.
> > Send UTF-8 to "modern" browsers (IE 5.x, NN 6.x).
> > Send legacy encodings (such as Big5) to older browsers.
> > Send UTF-8 to browsers serving languages that are compatible with UTF-8
> > (Latin script languages in Western and Central Europe mostly).
> >
> > Regards,
> >
> > Addison
> >
> > ===========================================================
> > Addison P. Phillips Principal Consultant
> > Inter-Locale LLC http://www.inter-locale.com
> > Los Gatos, CA, USA mailto:addison@inter-locale.com
> >
> > +1 408.210.3569 (mobile) +1 408.904.4762 (fax)
> > ===========================================================
> > Globalization Engineering & Consulting Services
> >
> > On Wed, 4 Oct 2000, Sandeep Krishna wrote:
> >
> > > hi guys!!
> > >
> > > can someone tell me whether all browsers (atleast IE 2,3.0 and
> > Netscape...) support encoding/deocding on UTF-8....
> > >
> > > and also, can there be an instance of browser (say a primitave version
> of
> > a Chinese Netscape) that supports Big 5 encoding but not UTF-8.
> > > THis info. is crucial as i expect all users (of the site) to be
capable
> of
> > using only UTF-8 encoding.......
> > > so if there is a user whose browser doesnt support UTF-8 or it
supports
> > Big 5 but not UTF-8 then this is trouble..........
> > >
> > > anyone with some idea on this issue.......
> > >
> > > regards,
> > >
> > > Sandeep
> > >
> > >
> > >
> >
>
****************************************************************************
> > *******************
> > > SANDEEP KRISHNA
> > > Member Technical Staff (Priceline.com)
> > > H.C.L. Technologies Limited
> > > A-1 C&D, Sector -16, NOIDA, UP, India.
> > > Ph: 91-11-91-4516321 (extn. 1062)
> > > Fax: 91-11-91-4510713, 4510226
> > > E-Mail : sandeepkrishna@noida.hcltech.com
> > >
> > >
> > > ~Don't frown, because you never know who's
> falling
> > in love with your smile!~
> > >
> >
> >
>
>



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:14 EDT