工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

huangapple go评论42阅读模式
英文:

Tool to create and copy special and non-printable character string to Clipboard for testing

问题

I'm looking for a tool (ideally online) that lets me specify a string with special and unprintable character codes (e.g. < Code 32), by code, and copy it to the Clipboard for testing.

我正在寻找一个工具(最好在线的),允许我按代码指定包含特殊和不可打印字符代码的字符串(例如< Code 32),并将其复制到剪贴板以进行测试。

There are tools that do the opposite, like this one: https://www.soscisurvey.de/tools/view-chars.php - Here you can paste a string and see what special characters it contains.

有一些相反的工具,比如这个:https://www.soscisurvey.de/tools/view-chars.php - 在这里,您可以粘贴一个字符串并查看它包含的特殊字符。

I can write a Java program that specifies chars by code, but that's only useful to me as a developer when debugging (e.g. in Eclipse). The testing team needs a way to prepare strings with special chars based on codes, as below, copy them to the Clipboard as rendered strings, and then input them as test data into GUI fields.

我可以编写一个Java程序,通过代码指定字符,但那只对我作为开发人员在调试时有用(例如在Eclipse中)。 测试团队需要一种根据代码准备包含特殊字符的字符串、将其复制到剪贴板作为呈现的字符串,然后将其输入为GUI字段的测试数据的方式,如下所示。

String testStr = " ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
"abcdefghijklmnopqrstuvwxyz" +
"1234567890" +
"`~!@#$%^&*()-_=+" +
"[]
{}|" +
";':&quot;" +
",./<>?" +
"\r\n" + // CARRIAGE RETURN, LINE FEED
"\u00e1" + // e1 // 0x00E1 225 LATIN SMALL LETTER A WITH ACUTE
"\u00e9" + // e9 // 0x00E9 233 LATIN SMALL LETTER E WITH ACUTE
"\u00ed" + // ed // 0x00ED 237 LATIN SMALL LETTER I WITH ACUTE
"\u00f3" + // f3 // 0x00F3 243 LATIN SMALL LETTER O WITH ACUTE
"\u00fa" + // fa // 0x00FA 250 LATIN SMALL LETTER U WITH ACUTE
"\u00fc" + // fc // 0x00FC 252 LATIN SMALL LETTER U WITH DIAERESIS
"\u00f1" + // f1 // 0x00F1 241 LATIN SMALL LETTER N WITH TILDE
"\u00c1" + // c1 // 0x00C1 193 LATIN CAPITAL LETTER A WITH ACUTE
"\u00c9" + // c9 // 0x00C9 201 LATIN CAPITAL LETTER E WITH ACUTE
"\u00cd" + // cd // 0x00CD 205 LATIN CAPITAL LETTER I WITH ACUTE
"\u00d3" + // d3 // 0x00D3 211 LATIN CAPITAL LETTER O WITH ACUTE
"\u00da" + // da // 0x00DA 218 LATIN CAPITAL LETTER U WITH ACUTE
"\u00dc" + // dc // 0x00DC 220 LATIN CAPITAL LETTER U WITH DIAERESIS
"\u00d1" + // d1 // 0x00D1 209 LATIN CAPITAL LETTER N WITH TILDE
"\u00bf" + // bf // 0x00BF 191 INVERTED QUESTION MARK
"\u00a1"; // a1 // 0x00A1 161 INVERTED EXCLAMATION MARK)

Also, I can't just copy rendered symbols from various online listings of character codes, since unprintable chars < Code 32 will be masked by the browser. I've looked into Notepad++ plugins, but they're also not that straightforward. In Notepad++, I can type Alt+[Code] to insert a special character, but anything <32 will be masked and I can't copy it for my purposes.

此外,我不能只是从各种在线字符代码列表中复制已呈现的符号,因为不可打印的字符< Code 32将被浏览器遮盖。 我已经研究了Notepad++插件,但它们也不是那么简单。 在Notepad++中,我可以键入Alt+[Code]以插入特殊字符,但<32的任何字符将被遮盖,我无法复制它以满足我的需求。

英文:

I'm looking for a tool (ideally online) that lets me specify a string with special and unprintable character codes (e.g. < Code 32), by code, and copy it to the Clipboard for testing.

There are tools that do the opposite, like this one: https://www.soscisurvey.de/tools/view-chars.php - Here you can paste a string and see what special characters it contains.

I can write a Java program that specifies chars by code, but that's only useful to me as a developer when debugging (e.g. in Eclipse). The testing team needs a way to prepare strings with special chars based on codes, as below, copy them to the Clipboard as rendered strings, and then input them as test data into GUI fields.

String testStr = &quot; ABCDEFGHIJKLMNOPQRSTUVWXYZ&quot; +
            &quot;abcdefghijklmnopqrstuvwxyz&quot; +
            &quot;1234567890&quot; +
            &quot;`~!@#$%^&amp;*()-_=+&quot; +
            &quot;[]
{}|&quot; +
            &quot;;&#39;:\&quot;&quot; +
            &quot;,./&lt;&gt;?&quot; +
            &quot;\r\n&quot; + // CARRIAGE RETURN, LINE FEED
            &quot;\u00e1&quot; + //     e1 //    0x00E1    225    LATIN SMALL LETTER A WITH ACUTE
            &quot;\u00e9&quot; + //     e9 //   0x00E9    233    LATIN SMALL LETTER E WITH ACUTE
            &quot;\u00ed&quot; + //     ed //   0x00ED    237    LATIN SMALL LETTER I WITH ACUTE
            &quot;\u00f3&quot; + //     f3 //   0x00F3    243    LATIN SMALL LETTER O WITH ACUTE
            &quot;\u00fa&quot; + //     fa //    0x00FA    250    LATIN SMALL LETTER U WITH ACUTE
            &quot;\u00fc&quot; + //     fc //    0x00FC    252    LATIN SMALL LETTER U WITH DIAERESIS
            &quot;\u00f1&quot; + //     f1 //    0x00F1    241    LATIN SMALL LETTER N WITH TILDE
            &quot;\u00c1&quot; + //     c1 //    0x00C1    193    LATIN CAPITAL LETTER A WITH ACUTE
            &quot;\u00c9&quot; + //     c9 //    0x00C9    201    LATIN CAPITAL LETTER E WITH ACUTE
            &quot;\u00cd&quot; + //     cd //    0x00CD    205    LATIN CAPITAL LETTER I WITH ACUTE
            &quot;\u00d3&quot; + //     d3 //    0x00D3    211    LATIN CAPITAL LETTER O WITH ACUTE
            &quot;\u00da&quot; + //     da //    0x00DA    218    LATIN CAPITAL LETTER U WITH ACUTE
            &quot;\u00dc&quot; + //     dc //    0x00DC    220    LATIN CAPITAL LETTER U WITH DIAERESIS
            &quot;\u00d1&quot; + //     d1 //    0x00D1    209    LATIN CAPITAL LETTER N WITH TILDE
            &quot;\u00bf&quot; + //     bf //    0x00BF    191    INVERTED QUESTION MARK
            &quot;\u00a1&quot;; //     a1 //   0x00A1    161    INVERTED EXCLAMATION MARK) 

Also, I can't just copy rendered symbols from various online listings of character codes, since unprintable chars < Code 32 will be masked by the browser. I've looked into Notepad++ plugins, but they're also not that straightforward. In Notepad++, I can type Alt+[Code] to insert a special character, but anything <32 will be masked and I can't copy it for my purposes.

答案1

得分: 2

我还找到了一个Notepad++的解决方案。点击编辑 -> 字符面板。从字符面板中,在第三列双击您想要插入的特殊字符。

工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

英文:

I also found a Notepad++ solution. Click Edit -> Character Panel. From the character panel, double-click in the 3rd column the special char you want to insert.

工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

答案2

得分: 0

CyberChef 似乎是你可以使用的工具。它有一个在线版本在这里,或者你可以从GitHub获取它的源代码。它是文本处理的瑞士军刀(编码、解码、解密)。对于你的用例,请从“操作”中选择“从字符编码”并使用十进制。

工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

我能够使用它将非可打印字符复制到Notepad++中。

英文:

CyberChef seems like a tool you could use. It has an online version here or you can grab it via sources from github. It's a swiss army knife for text processing (encoding, decoding, deciphering). For your use case select From Charcode from operations and use base 10.
工具用于创建和复制特殊和不可打印字符字符串到剪贴板以进行测试

I was able to copy the non-printables to Notepad ++ with it.

huangapple
  • 本文由 发表于 2023年6月6日 01:13:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76408651.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定