16

最近の問題*により、ファイルのすべての文字が見えなくても表示できるテキストエディタがあるかどうか疑問に思いました。具体的には、16進編集機能を探しているのではなく、すべての非表示文字(一般的な空白/改行文字だけでなく)を表示するテキストエディターに興味があります。BOMマーカーは単なる一例であり、他のマーカーは、数学的に見えない文字やサポートされていない可能性のある文字などです。

多種多様なテキストエンコーディング/エンコーディング間の翻訳を単にサポートするテキストエディタを探していません。私が遭遇したすべてのテキストエディタは、非表示の文字を正しく処理します。つまり、非表示のままにします(または、BOMマーカーの場合のように翻訳で削除されます)。

私はこれを主に学術的な興味から求めているので、特定のOSについては特に気にしません。LinuxおよびOSXソリューションは簡単にテストできますが、Windowsエディターをお勧めする場合は、エディターが空白/改行以外の非表示を処理する方法の説明を含めていただければ幸いです。

編集:私が望む振る舞いは、カスタムハイライトを介して、またはフォント自体をいじることによって、emacs/vimに実装できることを確認し始めています。このタイプのソリューションも受け入れられます。

EDIT2:いくつかのオプションを調べた後、ファイル内の非表示のUTF-8文字が含まれる空白スペースを少なくとも表示するTextMateを見つけました。私の質問に答えるSOの能力に少しがっかりしました。バウンティはVIMに行きます。それは、ソリューションが存在する可能性が最も高い方向だからです。


*この質問に私を導いた事件:私はTextWranglerを使用してperlスクリプトを作成し、ファイルの先頭にBOMマーカーを挿入するUTF8BOMにエンコードを変更することに成功しました。Perl(またはオペレーティングシステム)はすぐに#を見逃します!そして騒乱が続く。さまざまな「非表示を表示」オプションがオンになっている場合でも、ほとんどのテキストエディタはBOMマーカーを表示しないため、これを理解するのに午後の大部分を要しました。今、私は私のレッスンを学び、lessすぐに使用します:-)。

4

9 に答える 9

20

vim (in either textual or graphic mode) can show all control characters if you :set list. The BOM is a special case, controlled by the :set bomb or :set nobomb commands.

于 2010-04-04T15:13:14.300 に答える
9

Visual Studioの[ファイルを開く]ダイアログでは、[開く]プッシュボタンの横に下向き矢印があり、[プログラムから開く...]を選択できます。表示されるダイアログのオプションの1つは、バイナリエディタです。

私はこれを時々使用して、見えない文字を見つけたり、行末の問題を解決したりしました。

于 2010-03-26T21:34:43.537 に答える
6

Notepad ++のロック:

npp

于 2010-03-26T21:34:14.507 に答える
5

EMACSでファイルを開き、MXhexl-modeを実行します。次のような表示が表示されます。

87654321 0011 2233 4455 6677 8899 aabb ccdd eeff 0123456789abcdef                               
00000000:2320 2020 2020 2020 2020 2020 2020 2020#               
00000010:2020 2020 2020 2020 2020 2020 2020 2020                  
00000020:2020 2020 2020 2020 2020 2020 2020 2020                  
00000030:2d2a 2d20 4175 746f 636f 6e66 202d2a2d-*-Autoconf-*-
00000040:0a23 2050 726f 6365 7373 2074 6869 7320。#これを処理する
00000050:6669 6c65 2077 6974 6820 6175746f636fファイルとautoco
00000060:6e66 2074 6f20 7072 6f64 7563 65206120nfを生成するには
00000070:636f 6e66 6967 7572 6520 736372697074構成スクリプト
00000080:2e0a 2320 4f72 6465 7220 6973 206c 6172 ..#注文はlar
00000090:6765 6c79 2069 7272 6576 656c6c616e74ゲル状の無秩序
000000a0:2c20 616c 7468 6f75 6768 2069 7420 6d75、ただしmu
000000b0:7374 2073 7461 7274 2077 6974 68204143stはACで開始
000000c0:5f49 4e49 5420 616e 6420 656e 64207769_INITおよび終了wi
000000d0:7468 2041 435f 4f55 5450 5554 0a23 2053 th AC_OUTPUT。#S
000000e0:6565 2068 7474 703a 2f2f 6175 746f 746f ee http:// autoto
000000f0:6f6c 7365 742e 736f 7572 6365 666f 7267 olset.sourceforg
00000100:652e 6e65 742f 7475 746f 7269 616c 2e68 e.net/tutorial.h
于 2010-06-06T00:36:23.937 に答える
3

I've encountered the same limitations — my specific issue is the need to be able to display characters like U+200B, the zero-width space, and U+200C, the zero-width non-joiner. (Used in electronic texts with such languages as Khmer, which otherwise do not separate words with spaces.) Unlike you, instead of "platform doesn't matter," I need an editor with Windows and Linux versions, and Mac too is desirable.

I haven't found any text editors that will let you display them on-screen, although some (many?) will let you enter them and will properly treat them as characters that can be cut and pasted and whose presence is indicated via cursor movement. (That is, if the screen shows "if" and there are three ZWSP's between the "i" and "f," you have to press the arrow key four times to move from "i" to "f.")

TextPad 4.7.3 is otherwise my text editor of choice, but it is very limited in its acceptance of scripts; and TextPad 5 definitely does not show these invisibles.

I have often resorted to opening my files in OpenOffice.org Writer, which will show a gray slash at these characters' location with invisibles turned on, and Microsoft Word, which displays a double-box (box within a box) character for such invisibles. This double-box has width and changes the line-breaks on-screen, which is not trivial and which I haven't seen in any other editor.

于 2010-04-24T16:47:05.437 に答える
3

You can also user Notepad ++ to show them. Here is an example, the black boxes are control characters.

Notepad ++ Control Characters Example

于 2014-10-30T03:03:25.507 に答える
2

I prefer UltraEdit even though it is not free. It is very capable of showing hidden characters, including a robust HEX viewing mode. (I am not affiliated with the publisher, IDM.)

于 2010-03-31T15:57:42.173 に答える
1

I am not sure as I haven't used it in a while, but I remember that SciTE was a good one that showed me "too much information" for my needs.

Programmer's Notepad on Windows might work.

TextPad (It's nagware, runs on Windows)

I'm not sure which of these will show the hidden characters out of the box, but they're all made for "nerdy" stuff, so I assume that they would work ,at least with a little tweaking. I can verify that Programmer's Notepad does show "hidden" characters.

于 2010-04-04T15:16:06.510 に答える
1

If you are running a 32 bit version of windows, you can see BOMs and other invisible characters such as carriage return or line feeds that look like a music eighth note in MS Dos Editor which you can open by typing "edit" in the run box or from a command prompt. Unfortunately, the ms dos editor is not available on 64 bit systems :(

于 2010-12-10T03:35:34.610 に答える