Hongmu Notes

🧶 Native to Unicode entity conversion

Convert text to decimal character entities in both directions.

Native to Unicode entity conversion

Instructions for use

  • The text is filled in at the top and the entity is filled in at the bottom. Press the button to switch in both directions.
  • The entity is in the form of &# plus decimal code point plus semicolon. The semicolon cannot be omitted.
  • Keep non-solid parts intact during restoration

Batch entity conversion

When several paragraphs of content need to be processed at one time, one conversion after merging is faster than pasting paragraphs one by one, and the results are also kept in the same output for easy copying as a whole.

📌 What should you pay attention to when merging multiple segments?

It is recommended to keep a blank line or separation mark between paragraphs to facilitate segmentation and verification after conversion; do not mix different coding methods (such as an entity and an escape) between paragraphs, otherwise part of the data will match and part will not match during restoration.

🔒 Dealing with location and privacy

The conversion is completed locally in the browser. The data is not uploaded to the server or written to local storage. It is cleared when the page is refreshed. The pasted content may come from emails and internal systems. This tool does not collect or save it. If you need to post the results to an external work order, it is recommended to confirm the scope of disclosure first.

📌 Conversion rules

Both directions are processed character by character: when converting to entities, the Unicode code point of each character is taken and spelled into the form of &# plus decimal digits plus semicolon, so a Chinese character will occupy more than seven digits; when restoring, use regular expressions to match all entity fragments, extract the decimal digits and convert them back to characters, and keep the parts that are not in the entity as they are, so the entire mixed content can be restored safely.

All keywords and tutorials 12

❓ FAQ

Can it be output separately by segment?
No. After merging, they are converted together and output as an entity string.
Can it handle long text?
Can. Converting tens of thousands of characters at a time is very fast.
Processing after batch entity conversion
First check whether the ratio between the length and the original text is reasonable, then randomly check the first and last fragments, and finally restore and verify it as a whole.