it-tools icon indicating copy to clipboard operation
it-tools copied to clipboard

Enhance "Text to Unicode" Tool to Support \uXXXX and \UXXXXXXXX Unicode Escape Sequences

Open SuiYunsy opened this issue 1 year ago • 0 comments

What type of request is this?

New feature for an existing tool

Clear and concise description of the feature you are proposing

Currently, the "Text to Unicode" tool converts text to HTML entity encoding (e.g., 可). I propose enhancing the tool to also support conversion to standard Unicode escape sequences, specifically the \uXXXX (for Basic Multilingual Plane characters) and \UXXXXXXXX (for supplementary characters) formats. This would allow users to obtain Unicode representations that are more commonly used in programming languages and text files, in addition to the existing HTML entity output.

Is their example of this tool in the wild?

Many online tools and programming language environments support \uXXXX and \UXXXXXXXX Unicode escape sequences. For example:

  • Online Converters: Numerous websites offer text to Unicode converters that use these formats (a quick web search for "text to unicode converter" will reveal examples).
  • Programming Languages: Languages like JavaScript, Python, Java, C#, etc., use \uXXXX and \UXXXXXXXX for representing Unicode characters within code.

Additional context

  • Output Options: The "Text to Unicode" tool should offer an option (e.g., a dropdown or radio button) to select the desired output format:
    • HTML Entity Encoding (current behavior)
    • \uXXXX Unicode Escape Sequences (for BMP characters)
    • \UXXXXXXXX Unicode Escape Sequences (for supplementary characters)
  • Input Handling: The tool should also be able to parse these \uXXXX and \UXXXXXXXX formats when converting from Unicode back to text.

Validations

  • [X] Check the feature is not already implemented in the project.
  • [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [X] Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).

SuiYunsy avatar Dec 15 '24 15:12 SuiYunsy