Re: Foreign chars in window title bar
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Fri, 11 Aug 2006 13:11:38 -0500
Tom de Neef wrote:
"Rob Kennedy" <me3@xxxxxxxxxxx> schreef in bericht news:4k2u5fFabqauU1@xxxxxxxxxxxxxxxxxTom de Neef wrote:More to do with windows/html than with Delphi I'm afraid:
I try to get "Hans Skr?der J?rgensen" in the title bar of a window.
How are you trying?
<html><head>
<title ...>
So, its up to the browser to write the title bar.
I tried URLencode to transform the title string but the display is then with the ampersands and semicolons.
Then your URLEncode function is broken. It should have returned percent characters and numerals for the characters that are not valid in URLs, not ampersands and semicolons. But you're not working with URLs; you're working with HTML, so if anything you should have an HTMLEncode function.
What character encoding are you using for your output? If it's UTF-16, then try including a BOM at the start of the file. Otherwise, if it's not ASCII or UTF-8, then you should include a META element like this:
<meta http-equiv="Content-Type" value="text/html; charset=CHARSET-GOES-HERE"/>
Normally, the HTTP server should include the content type in the headers it sends, but we don't always have control over the header's contents, and there isn't always a server involved.
If you're actually producing XHTML, then include an XML processing instruction like this (or use a real XML generator):
<?xml version="1.0" charset="CHARSET-GOES-HERE"?>
Once you do all this, you can be confident that you've included all the characters in your file correctly. Then it becomes an issue of whether the browser can read the file correctly, whether it can send those characters to the OS window manager, and whether the OS can display the characters in its title-bar font. All those are beyond your control.
--
Rob
.
- Follow-Ups:
- Re: Foreign chars in window title bar
- From: Tom de Neef
- Re: Foreign chars in window title bar
- References:
- Foreign chars in window title bar
- From: Tom de Neef
- Re: Foreign chars in window title bar
- From: Rob Kennedy
- Re: Foreign chars in window title bar
- From: Tom de Neef
- Foreign chars in window title bar
- Prev by Date: Re: Create objects using dynamic class names
- Next by Date: Re: Foreign chars in window title bar
- Previous by thread: Re: Foreign chars in window title bar
- Next by thread: Re: Foreign chars in window title bar
- Index(es):
Relevant Pages
|