# HTML decoder in Natural

**URL:** <https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Web-and-XML-Technology\
**Created:** [June 24, 2010, 11:52pm UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959 "2010-06-24T23:52:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_Soehnlin](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Craig\_Soehnlin](https://techcommunity.softwareag.com/u/Craig_Soehnlin)\
**Post date:** [June 24, 2010, 11:52pm UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959/1 "2010-06-24T23:52:07Z")

</div>

Is there a function or utility to decode HTML encoding in Natural? We have a need to remove encoding from strings (not xml documents).  
Thanks,  
Craig Soehnlin

---

<div class="post-metadata">

**Author:** ![Brian\_Johnson1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/brian_johnson1/32/163_2.png) [@Brian\_Johnson1](https://techcommunity.softwareag.com/u/Brian_Johnson1)\
**Post date:** [June 25, 2010, 1:37am UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959/2 "2010-06-25T01:37:10Z")

</div>

Do you mean for displaying HTML for I/O purposes, or more like string parsing? I could see you wanting to display a web page, or maybe reverse engineer a 3270 map out of a web page (though that sounds rather difficult), or perhaps interpreting data from a table (or something like that) for processing and storage.

---

<div class="post-metadata">

**Author:** ![Craig\_Soehnlin](https://avatars.discourse-cdn.com/v4/letter/c/ee59a6/32.png) [@Craig\_Soehnlin](https://techcommunity.softwareag.com/u/Craig_Soehnlin)\
**Post date:** [June 25, 2010, 1:43am UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959/3 "2010-06-25T01:43:15Z")

</div>

we have a .net app that is sending data and is using HTML encoding to send special characters in the free form text. We need to have Natural remove the encoding and insert the proper characters. We could do a lot of examine replaces, but it would be much nicer to have a function or utility I could call to do it all at once. The XML parser does XML decoding but this data is a string, not a document.  
Thanks,  
Craig Soehnlin

---

<div class="post-metadata">

**Author:** ![chrisadam12](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@chrisadam12](https://techcommunity.softwareag.com/u/chrisadam12)\
**Post date:** [August 25, 2010, 12:51pm UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959/4 "2010-08-25T12:51:02Z")

</div>

To help with debugging of Unicode and UTF-8 related problems, I’ve written two tools:

utf8-decoder  
Paste in some UTF-8 bytes (either as hexadecimal, decimal, octal, or binary numbers, or as a hex dump, or as raw bytes in the form of Windows-1252 or ISO-8859-1 characters) and this script will tell you what the characters are, including UTF-8 decoding diagnostics.

For example, if you are viewing a UTF-8 encoded file in a raw Emacs buffer, and your buffer contains \342​\200​\253​\330​\263​\331​\204​\330​\247​\331​\205, and you want to know what on earth that is, you just need to select that exact string, paste it into the script’s input field, and click the submit button. It will then tell you the characters are:

202B RIGHT-TO-LEFT EMBEDDING  
0633 ARABIC LETTER SEEN  
0644 ARABIC LETTER LAM  
0627 ARABIC LETTER ALEF  
0645 ARABIC LETTER MEEM  
This can be very useful, especially since the first one above (the RLE) is not a visible character! The script also includes some other useful information, such as the binary representation of each input byte and the entities you would use to include the characters in a US-ASCII HTML or XML file.

* * *

Google’s first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups [seo pecialist](http://oceangroups.org/)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:58pm UTC](https://techcommunity.softwareag.com/t/html-decoder-in-natural/93959/5 "2021-04-02T14:58:41Z")

</div>

Closed on April 2, 2021, 2:58pm UTC


