Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS Util Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/HTML Encoding
This example is the version from Sun, 17th Mar 2012.
Project "HTML Encoding.xojo_binary_project"
Class Window1 Inherits Window
Control EditField1 Inherits TextArea
ControlInstance EditField1 Inherits TextArea
EventHandler Sub TextChange()
dim s as string
if not running then
running=true
s=DecodingFromHTMLMBS(EditField1.text)
if TargetWin32 then
s=NativeStringMBS(s) // RB 4.x can't display unicode on Windows.
end if
EditField2.text=s
running=False
end if
End EventHandler
End Control
Control EditField2 Inherits TextArea
ControlInstance EditField2 Inherits TextArea
EventHandler Sub TextChange()
if not running then
running=true
EditField1.text=EncodingToHTMLMBS(EditField2.text)
running=False
end if
End EventHandler
End Control
EventHandler Sub Open()
dim s as string
s=EncodingToHTMLMBS("Some special characters like &äöüßÜÖÄ∑€®†Ω¨⁄øπ•?") // <-- CONVERTED
EditField1.text=s
s=DecodingFromHTMLMBS(s)
if TargetWin32 then
s=NativeStringMBS(s) // RB 4.x can't display unicode on Windows.
end if
EditField2.text=s
End EventHandler
Property Protected running As boolean
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
The items on this page are in the following plugins: MBS Util Plugin.