Sparkies old trick still works with IE7, with and without unicode, if you write the html
to a unicode file (writeString(0, s, #PB_UNICODE) instead of loading it with an "about:.. string.
Just thought I should let you know in case you like to experiment with web-like interfaces like I do..

Code: Select all
;-initialize
;-
Enumeration
#WIN1
#WEB1
EndEnumeration
Global path.s = GetPathPart(ProgramFilename()) + "page.html"
Declare openMainWindow()
Declare.s page1(path.s)
;-program entry
openMainWindow()
;expose the IWebBrowser2 object
webObject.IWebBrowser2 = GetWindowLong_(GadgetID(1),#GWL_USERDATA)
;-program event handler
Repeat
event = WaitWindowEvent()
If isBusy ;loading
webObject\get_ReadyState(@isReady)
If isReady
url.s = GetGadgetText(1)
If FindString(url, "link", 1)
;link clicked, cancel navigation
SetGadgetState(1,#PB_Web_Back)
;process the link event
MessageRequester("Processing", url)
EndIf
EndIf
EndIf
webObject\get_busy(@isBusy)
Until event = #PB_Event_CloseWindow
;-program exit
;-
DeleteFile(path)
End
Procedure openMainWindow()
flags = #PB_Window_ScreenCentered | #PB_Window_SystemMenu
If OpenWindow(0, 0, 0, 600, 400, "", flags)
WebGadget(1, 0, 0, 600, 400, page1(path))
EndIf
EndProcedure
Procedure.s page1(path.s)
s.s = "<html><body><a href = 'link'>Click this link ÆØÅ</a></body></html>"
;write the string to a file
If FileSize(path) = -1
;the file doesn't exist yet, create it
CreateFile(0, path)
WriteString(0, s, #PB_Unicode)
CloseFile(0)
EndIf
ProcedureReturn "file://" + path
EndProcedure