looking for a UTF-8 text editor

2019-02-07 08:55发布

I am looking for a (simple) text editor that can handle text in different encodings in the same document.

I need to develop some sites with mixed Japanese and English text and the editors I have now (on an English Windows system) are unable to display the Japanese text. Jedit files don't display the Japanese text I have inputted but when I look at the file in a browser it shows up correctly. Gvim shows all Japanese text in the editor as question marks and also in the browser. In Gvim inputting the kanji works (you input the pronounciation and then press space bar to get the kanji) but when you confirm the kanji you want it replaces that kanji with question marks. (1 question mark for every kanji).

Can someone recommend me a text editor to edit html and php files that is able to display utf-8 encoded text and also save as an utf-8 file ?

thank you.

After reading about emacs I installed it. see below.

Thanks everybody for the hints. if you don't have a unicode font yet you have to find one online or buy one. here are the instructions to install the font on a windows system http://support.microsoft.com/kb/314960

jEdit I changed my font in Jedit to a UTF font and now the Japanese shows up normally. inputting the Japanese is still problematic as you don't see what you are typing. (to change your font to edit files go to Utilities -> Global Options -> text area select a Unicode font and you'll be able to see the Japanese characters.

gVim I am still trying to figure out how to add a font in gvim. Once I know how to do that I ll update this.

Emacs Emacs does not show the kanji correctly, they are displayed as ??? but at least I can see what I type in Japanese and select the right word.

so at this point I have to say that in jEdit I can see Japanese text but I can't input Japanese text. Gvim I can input Japanese text but inside the text area it is displayed as ??? and the same goes for Emacs. adding a font in emacs and gvim is sadly enough not a trivial task. At the moment I use notepad with the Arial unicode MS font and saving as UTF-8 file as my Japanese editor. Not ideal but at least it works.

23条回答
我欲成王,谁敢阻挡
2楼-- · 2019-02-07 09:38

It sounds like maybe the problem with Jedit is the font - are you using a font that can display all the characters correctly?

To be more precise, Arial Unicode MS is a reasonable choice for a Unicode font that can display a wide range of characters across the range of languages. There are certain issues with it that can make it less than optimal for some languages used in isolation - this is why there are also language specific Unicode fonts included with Windows.

查看更多
相关推荐>>
3楼-- · 2019-02-07 09:39

Emacs correctly handles UTF-8 for me. (And of course, it can edit HTML and PHP files).

查看更多
兄弟一词,经得起流年.
4楼-- · 2019-02-07 09:40

EditPad Lite and Pro fully support Unicode as of version 6. (Disclaimer: Those are my own products.)

If you get question marks, you're using an encoding that does not support Japanese characters. In EditPad, you can change the text encoding (Unicode, legacy code pages) via Convert, Text Encoding. You can set the defaults per file type in Options, Configure File Types, Encoding.

If you see squares instead of Japanese characters, select a Japanse font or Unicode font. You can do this in EditPad via Options, Font.

To type Japanese, simply install a Japanese keyboard driver in the keyboard settings in the Windows Control Panel, if you haven't already.

EditPad Pro has preconfigured file types for PHP and HTML.

查看更多
相关推荐>>
5楼-- · 2019-02-07 09:41

Notepad++ is highly recommended.

查看更多
smile是对你的礼貌
6楼-- · 2019-02-07 09:44

EmEditor is written by a Japanese company for exactly this purpose. It is a fine text editor with good performance/simplicity but pretty much all the features expected of a capable editor; I use it as my default when on the Windows platform, as well as for editing Japanese web page templates. It deserves to be better-known IMO; it is at least as good as, say, TextPad, but with full Unicode support.

Unfortunately it is not free, however you can find a free version of the old EmEditor 6 at sites such as download.com.

查看更多
【Aperson】
7楼-- · 2019-02-07 09:44

Just to add another one: I just checked that Programmer's Notepad 2 has some UTF-8 setting too.

(vim and emacs do just fine as well)

查看更多
登录 后发表回答