View Full Version : Special characters and Notepad2
08-02-2007, 06:37 PM
If I click 'view source' from:
and copy some particularly obscure special characters (extended IPA) from the notepad file that shows me the source, then paste them into a Notepad2 file, I sometimes get the dreaded 'square', and sometimes see the character properly.
Note that the encoding of the Notepad2 file is UTF-8 before I paste the characters.
Moreover, even when the 'squares' are shown in the file, Firefox correctly displays the special characters after uploading the file.
Please could someone shed some light on this strange behaviour for me? :-)
My goal is to type IPA into the Notepad2 file (i.e. for the symbols to be visible, without the need for typing char refs and other hard-to-proofread nonsense).
Perhaps my problem is that I need a different text editor, though I can't think why Notepad2 shouldn't handle this correctly...
Thanks a lot.
08-03-2007, 06:35 AM
So when you copy and paste these (http://www.tedmontgomery.com/tutorial/HTMLchrc.html) codes you get the square?
08-03-2007, 08:32 AM
Please could someone shed some light on this strange behaviour for me?You may need to configure your editor to use a font that contains the relevant characters. DejaVu Sans Mono is a free font that contains glyphs for the IPA character block in case you donít have one.
Firefox will substitute glyphs from other fonts when a font doesnít contain a needed glyph, hence why you will always see them display properly as long as a font is installed on the OS that contains the character; I donít know of any text editors with that capability.
08-03-2007, 11:30 AM
Twodayslate - all the symbols on the page you referenced appear perfectly in the notepad2 file.
Arbitrator - I don't know which font Notepad2 is using (nor is it possible to change it), but it clearly contains all the glyphs I need as even e̝ ('e raised')and chinese characters appear correctly. (In short, all unicode).
The strange thing is that there seems to be no way to input them by typing...I can only copy and paste from other sources. Plus, even when they appear on the notepad file, they suddenly metamorphose into squares when I try to edit them.
So, are there no text editors with full unicode support?
08-04-2007, 07:57 AM
Arbitrator - I don't know which font Notepad2 is using (nor is it possible to change it), but it clearly contains all the glyphs I need as even e̝ ('e raised')and chinese characters appear correctly. (In short, all unicode).Well, in Notepad++ I can get Japanese characters to display for a font that lacks glyphs for them, but characters from the IPA and symbols blocks show up with the replacement character glyph (the square). I would guess that it has language switching support rather than real glyph substitution capability. The same may be true for your Notepad2 program.
The strange thing is that there seems to be no way to input them by typing...I can only copy and paste from other sources. Plus, even when they appear on the notepad file, they suddenly metamorphose into squares when I try to edit them.The same thing happens when I use Notepad++. When I try to enter the character directly (holding Alt and pressing ď+266eĒ) I get a question mark (which is rendered literally as just that in the browser). When I copy and paste I get a square (yet itís rendered correctly in the browser).
Anyway, I would change your editorís font to something like DejaVu Sans Mono or another font that supports the IPA block. If Notepad2 canít change fonts, it would seem to be more primitive than Microsoft Notepad in that regard. Try another editor like jEdit. Notepad++ is also an option, however, it wonít allow me to select the DejaVu Sans Mono font for some reason (I can select DejaVu Sans Mono Bold Oblique though, oddly enough).
08-04-2007, 11:47 AM
Thanks for all that info. Very useful! :-)
I'll check out jEdit, and will bear everything you said in mind.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.