Convert a (cell) string to its Unicode representation in HTML.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
TOHTML Converts strings to their UTF-8 HTML representation
str = TOHTML(str) converts the input string or cell array of strings to its Unicode representation in HTML. All characters but one: any occurrence of the newline character (char(10)) will be converted to the string '<br>'.
This function is most useful when creating buttons in a GUI, that need to contain a multi-line string with Unicode characters. For example:
EXAMPLE:
uicontrol(...
'style' , 'pushbutton',...
'units' , 'normalized',...
'string' , toHTML(['θ·Ω' char(10) 'A×B']),...
'position', [0.05 0.05 0.1 0.1]...
);
Cite As
Rody Oldenhuis (2026). toHTML - convert Unicode string(s) to HTML (https://github.com/rodyo/FEX-toHTML/releases/tag/v1.3), GitHub. Retrieved .
General Information
- Version 1.3 (2.83 KB)
-
View License on GitHub
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
Versions that use the GitHub default branch cannot be downloaded
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.3 | See release notes for this release on GitHub: https://github.com/rodyo/FEX-toHTML/releases/tag/v1.3 |
||
| 1.2.0.0 | [linked to Github] |
||
| 1.1.0.0 | Updated contact info |
||
| 1.0.0.0 |
