How to convert a page to UTF 8

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
WazzoTheMartian
Posts: 3
Joined: Sun Apr 15, 2012 2:21 am

How to convert a page to UTF 8

Post by WazzoTheMartian »

Ever tried to convert your web pages to UTF 8 with TextPad and found that it wouldn't work?

TextPad 5 DOES work with UTF 8 but there is one hitch. You go ahead and set up your document preferences to save files as UTF 8 and you insert the standard: <meta http-equiv="content-type" content="text/html;charset=UTF-8"> into the header of your HTML files. You can see your glyphs in TextPad and you save the file, but when you look at the result in your browser you see a bunch of question marks.

Go ahead and look at the file properties in "view". You will see that the file is STILL encoded in ANSI. Thanks Helios!

The SOLUTION is to download a free copy of NotePad++, open your file, select "encoding/convert to UTF 8", save the file and exit. You can now open the file in TextPad and make your changes. When you look at the result in your browser you will find that your glyphs all work properly. You can save the file with TextPad and all is fine.

When you look again at the file properties under "view", you will see that the encoding is now UTF 8.

Correct me if I'm wrong, but TextPad does not offer a conversion utility like NotePad++, thus a default UTF 8 save option only works if the file is ALREADY converted. When will the necessary conversion feature be offered? No doubt Helios are busting to tell us the answer.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

DId you try
File | Save As... | Encoding: UTF-8
?

But be aware that while TextPad supports the UTF-8 encoding, it does not properly support the Unicode character set. Internally, it stores all the text of a document in a single 8-bit character set (a "code page" or "script"). It supports a number of code pages, but only one at a time: it displays all the text of each document using a single code page.

The range of code pages available depends on the font you are using. You can select the code page at
Configure | Preferences | Document Classes | <Class> | Font | Script
or
View | Document Properties | Font | Script.

If the characters in your document are not all in a single available code page, TextPad will not be able to display or save it correctly.
User avatar
WazzoTheMartian
Posts: 3
Joined: Sun Apr 15, 2012 2:21 am

Post by WazzoTheMartian »

Ok, that works. Thanks Ben. :)
And now I find that all files are loaded by default as UTF 8. Perhaps I simply needed to close TextPad and perhaps reboot Windows for the change to take effect...

Perhaps this oversight could be fixed in a coming release, or at least documented so that others don't run into this issue. Really once you select UTF 8 in preferences, it should apply immediately...

As for the internal 8 bit limitation... I'm guessing that's not likely to be addressed any time soon?
shelimtonod
Posts: 4
Joined: Thu Jun 28, 2012 6:46 am

Post by shelimtonod »

So, the solution to using TextPad is to use Notepad++. That's exactly what I did! People have been asking for UTF8 in Textpad for about 10 years. It's never going to happen, and Notepad++ is my text editor now. In fact, pretty much anything EXCEPT TextPad is a usable text editor now.

I don't know who is supporting the company that sells TextPad. Why anybody would want to by buy it when it has been obsolete for a decade is beyond my comprehension. There's a lot of nice things about TextPad, but text is UTF8 now, but creaky old TextPad is still ASCII. Even "ASCII art" is UTF8.

TextPad is retarded, and I show my disapproval with a UTF8 emoticon:

ಠ_ಠ

That's pretty 'effing sad that TextPad's forum can do what TextPad can't. The only reason I'm on this site again was because I thought maybe after a few years of not using TextPad, it might have either died off, or began supporting UTF8. But noooo. Thankfully, the world is full of great software that supports UTF8, and here's how I feel about that:

٩(-̮̮̃-̃)۶

(yay)

It's too bad though, TextPad used to be my favorite text editor, and very nearly could have been once again. But, the forum is a better text editor than TextPad, and that's ridiculous.
User avatar
WazzoTheMartian
Posts: 3
Joined: Sun Apr 15, 2012 2:21 am

Post by WazzoTheMartian »

Yes, Notepad++ handles UTF8 well, HOWEVER it also has it's own problems, such as its idiotic colour schemes and it's inability to do the block indentation move that TextPad handles so well.

A text editor is a personal thing and I find that I like the way TextPad works, better than Notepad++. Sure, it doesn't do multi-byte internal encoding and is thus limited to one code page at a time. This COULD be a problem if you do multi-language in the one document, but I find the standard European code page does all I need, so TextPad just scrapes in as an acceptable tool for me.

Sure it would be nice if Helios would rewrite the program to use UTF8 natively but in the meantime, it is still better for me than Notepad++.
Johan
Posts: 9
Joined: Fri May 04, 2007 8:10 am

UTF8

Post by Johan »

@shelimtonod; Textpad has a lot of features I have never found in other editors:
- match brackets
- cursor beyond text (this one is so great when selecting text in long lines)
- block select mode
- great search features
So I love textpad... BUT WHY!?!?? no UTF8 support.... *sigh* This cannot be so hard to implement I guess???
shelimtonod
Posts: 4
Joined: Thu Jun 28, 2012 6:46 am

Post by shelimtonod »

Notepad++ does all that and more. Give it a try, it has gotten to be pretty good. NotePad++ offers so much, I don't miss TextPad anymore.
Johan
Posts: 9
Joined: Fri May 04, 2007 8:10 am

Post by Johan »

shelimtonod wrote:Notepad++ does all that and more. Give it a try, it has gotten to be pretty good. NotePad++ offers so much, I don't miss TextPad anymore.
I still miss one very important thing: cursor beyond line-end, this is a setting in TextPad which makes selecting inside a long line very easy.

Normally when selecting in a long line, if you accidentally move the mouse-pointer to high or to low it will select the line above or below, if these lines are short the selection moves back to the left and the whole horizontal scrolling moves to the left as well, which is of course really anoying.

With the setting 'Constrain the cursor to the text' (configure->preferences->editor) off you can select beyond the text and when you move up and down the horizontal scrolling will not jump back to the left, making life a lot less anoying ;-)

This setting I could not find in Notepad++, if this exists I'll leave Textpad in a second.
shelimtonod
Posts: 4
Joined: Thu Jun 28, 2012 6:46 am

Post by shelimtonod »

The 1 second countdown has started. I found this for you:

http://comments.gmane.org/gmane.comp.ed ... 2B%2B/7705

- Allow cursor after end of line
If checked, it's possible to position the cursor beyond the end of line. [Spaces
are silently added.]
Johan
Posts: 9
Joined: Fri May 04, 2007 8:10 am

Post by Johan »

shelimtonod wrote:The 1 second countdown has started. I found this for you:

http://comments.gmane.org/gmane.comp.ed ... 2B%2B/7705

- Allow cursor after end of line
If checked, it's possible to position the cursor beyond the end of line. [Spaces
are silently added.]
This is somebody asking the same feature, maybe I over look it, but I see no 'how to's' to configure notpad++ to have this feature... Please let me know where this setting is :-)
Johan
Posts: 9
Joined: Fri May 04, 2007 8:10 am

Post by Johan »

Well, I was searching around my self and I found a pretty good 'workaround' by using the really nice 'block-select' feature of NotePad++ by just holding the alt-key. (This is of course much easier than how it has been done in TextPad!) I can simply use this alt-select to select in one row, and selecting while holding the alt will prevent shifting back to the left if I accidentally move to far up or down. :-)

For many many years I have been using TextPad, but I guess this is goodbye! For an editor to have no good UTF-8 encoding features...
smjg
Posts: 30
Joined: Mon Mar 08, 2004 10:34 am
Contact:

Post by smjg »

WazzoTheMartian wrote:Sure it would be nice if Helios would rewrite the program to use UTF8 natively but in the meantime, it is still better for me than Notepad++.
There are simpler solutions than using UTF8 natively, such as using UTF32 natively, as explained in the long-running thread.
shelimtonod wrote:Notepad++ does all that and more. Give it a try, it has gotten to be pretty good.
And even has a bracket-matching algorithm that checks whether each bracket is in a string or comment.
shelimtonod wrote:NotePad++ offers so much, I don't miss TextPad anymore.
Same here. Since starting this thread I've moved into the "It's too late - I've already given up on TextPad" category.
markcrobinson
Posts: 1
Joined: Fri Oct 05, 2012 9:00 pm
Contact:

When I open a document with Chinese Characters...

Post by markcrobinson »

When I try to open a document with chinese characters, created in windows notepad, I get an error:
Warning <filename> contains characters that do not exist in code page 1252 (ANSI - Latin 1)..."
Then it turns all my characters into ?

Notepad seems to do this just fine. I would like to replace notepad with textpad, but need to figure out a way to resolve this.
Mark C Robinson
shelimtonod
Posts: 4
Joined: Thu Jun 28, 2012 6:46 am

Post by shelimtonod »

I have resolved it by switching to Notepad++. It seems a lot of other people have turned to Notepad++ too. I miss the refined polish of Textpad, but Notepad++ does the job very well.
Post Reply