> > In your example, char #162 is replaced by "¢" in the html > > output. This represent the cnet character whatever the code page is. > > Actually that is the bug, since #162 is the cent sign in CP 1252 but > not in CP 1251. This function is used to generate directory listings, > most file names including characters above #128 will be wrong > when the server does not run on Windows CP 1252.
Ah ! I understand now what you mean. The table used by TextToHtml should be based on the CP. I suggest adding an optional second argument to TextToHtml so that the user can specify the code page to be used. This argument could be the array to be used for conversion. Maybe the array of strings should be replace by an array of record, each element having the character code and the entities so that the mechanism can be used for any number of character code and for unicode as well. TextToHtml is used outside of the http server component (at least I use it outside) and has no control on the html header where the code page could be specified. It's up to the user - in that case - that the correct table be supplied in his own context. -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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
