Add Standard Unicode Encoding Support (\uXXXX) for Text Conversion
Describe the bug
Currently, the text-to-Unicode conversion feature outputs HTML entity codes (&#xxxxx;), which are not standard Unicode escape sequences. I'd like to request support for standard Unicode encoding (\uXXXX format).
What happened?
Proposed Solution:
// Text → Standard Unicode escape sequence (\uXXXX) function textToUnicodeEscape(text: string): string { return text.split('').map(c => '\u' + c.charCodeAt(0).toString(16).padStart(4, '0') ).join(''); }
// Unicode escape sequence → Text function unicodeEscapeToText(unicodeStr: string): string { return unicodeStr.replace(/\u([\dA-F]{4})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)) ); }
System information
E:\Work\it-tools-main>npx envinfo --system --browsers Need to install the following packages: [email protected] Ok to proceed? (y) y
System: OS: Windows 11 10.0.26100 CPU: (32) x64 Intel(R) Core(TM) i9-14900 Memory: 26.97 GB / 63.69 GB Browsers: Edge: Chromium (136.0.3240.92) Internet Explorer: 11.0.26100.1882
Where did you encounter the bug?
Public app (it-tools.tech)
Hi @superglg738 , should be ok here: https://sharevb-it-tools.vercel.app/text-to-unicode
And if you are interested in an up to date version of it-tools, with many improvements, new tools, and bug fixes, as this repo is almost no more maintained, I made a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools)
thanks for your answer。
sharevb vs corentinth
sharevb is 2025.06.15