Re: Foreign chars in window title bar



Tom de Neef wrote:
"Rob Kennedy" <me3@xxxxxxxxxxx> schreef in bericht news:4k2u5fFabqauU1@xxxxxxxxxxxxxxxxx
Tom 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
.



Relevant Pages

  • Writeup by Amit Klein (Trusteer): Address Bar Spoofing for IE6
    ... Address Bar Spoofing Attacks against Microsoft Internet Explorer 6 ... IE6 is the second most popular web browser, ... characters are not displayed in the address bar in some cases. ... The attack can be easily implemented using DNS wildcard mapping, ...
    (Bugtraq)
  • Re: Writeup by Amit Klein (Trusteer): Address Bar Spoofing for IE6
    ... The address bar appears like ... This write-up presents two new phishing attack techniques, ... characters are not displayed in the address bar in some cases. ... It was also verified that BIND 9 (the most popular DNS server ...
    (Bugtraq)
  • [NT] Address Bar Spoofing Attacks Against Microsoft Internet Explorer 6
    ... Get your security news from a reliable source. ... Address Bar Spoofing Attacks Against Microsoft Internet Explorer 6 ... i.e. it's different than the ASCII similar characters ...
    (Securiteam)
  • Re: K&R histogram help
    ... Print the length the bar is for, ... A pointer is a variable holding an address; ... The C standard says the following: ... characters for which isalnum is false. ...
    (comp.lang.c)
  • Re: How do I find character count in Word 2007?
    ... If you found the Word Count in the status bar, ... additional information such as characters with and without spaces. ... Microsoft Office MVP ... MVP FAQ site: http://mvps.org/ ...
    (microsoft.public.word.newusers)