Francois Piette wrote:
>> Or am I missing something?
> 
> I think so. Using "html entities" make sure the correct character is
> represented whatever the character set or character code is used by
> the browser.

That's correct, but the server maps the wrong HTML entities if it doesn't run 
in a locale that uses CP 1252!

For example:
Currently  char #162 is hard coded to represent the cent sign:
HTML Entity: 'cent'   , { #162 cent sign                                        
 }
    
In windows-1251 however #162 maps to the small kyrillic letter U (short).

--
Arno Garrels

> 
> --
> [EMAIL PROTECTED]
> Author of ICS (Internet Component Suite, freeware)
> Author of MidWare (Multi-tier framework, freeware)
> http://www.overbyte.be
> 
> ----- Original Message -----
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: <twsocket@elists.org>
> Sent: Thursday, October 09, 2008 9:47 AM
> Subject: [twsocket] HTML encoding in HttpSrv func. TextToHtmlText()
> 
> 
>> In function TextToHtmlText() the HTML encoding of characters above
>> #127 assumes code page  iso-8859-1.
>> 
>> const
>>     HtmlSpecialChars : array [160..255] of String[6] = (
>>         'nbsp'   , { #160 no-break space = non-breaking
>      }
>>         'iexcl'  , { #161 inverted exclamation
>     }
>>         'cent'   , { #162 cent sign
>> 
>> ..
>> 
>> This IMO should be exchanged by simple decimal notation:
>> '&#' + IntToStr(Ord(Char)) in both Icsv6 and Icsv7.
>> 
>> Decimal notation of characters <= #255 seems to work with all
>> browsers, tested even with Netscape 3.01.
>> With word-sized characters above #255 (D2009 and ICSv7) modern
>> browsers render the correct Unicode characters.
>> 
>> Or am I missing something?
>> 
>> --
>> Arno Garrels
>> 
>> --
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to