Example: /Util/HTML Encoding

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/Util/HTML Encoding


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.


💬 Ask a question or report a problem