Textpad and UTF8 error

General questions about using TextPad

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

Post Reply
Real
Posts: 2
Joined: Tue Oct 12, 2004 8:12 am

Textpad and UTF8 error

Post by Real »

Hi,

I have a big problem with textpad. I use an english windows and want to open a greek UTF8 file. It doesnt work :(
I choos UTF8 in the open file Dlg but I always get the error that some chars could not be shown in the codepage...
Why codepage for UTF8??

I thried this with other editors like Ultraedit and it works fine there :(

Textpad only allows me to edit UTF8 files without special characters.
Is this a bug in textpad??
Real
Posts: 2
Joined: Tue Oct 12, 2004 8:12 am

Post by Real »

sorry I forget to mention, Im using Textpad 4.7.1
but in the release notes of 4.7.2 and 4.7.3 is nothing with UTF8 so I thing there were no changes
mo
Posts: 306
Joined: Tue Mar 11, 2003 1:40 am

Post by mo »

In TextPad you need to set up a special file-type to do this.

Go to: Configure > New Document Class
Give the Document Class a name: e.g.: GK
Specify the class members: e.g. *.grk (i.e., you make up your own file extension)
Check off if you want Syntax Highlighting and specify the syntax file to use.
Click Finish.

Go to: Configure > Preferences > Document Classes > GK
Expand 'GK' and click > Font
Select your Greek Unicode Font, size, etc.
Change any other preferences for this Document Class and whether it is for Screen or Printing or both.
OK

Then you will see your document with all the characters, but of course you may probably need to save this file with two different extensions (*.grk *.html) to both edit it and use it.
Best Wishes!
Mike Olds
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

A search would have provided you with such links as Unicode support and typing UNICODE.

TextPad is not a Unicode editor. It converts all characters internally to a character set that depends on the font and script that you have specified for the document you are editing. By default the script is "Western". In a single document you can only view characters that are represented in that font and script. You can set the script for the current document with
View | Document Properties | Font | Script
If you set this to "Greek" you will be able to see Latin and Greek letters together in that document.
tet
Posts: 3
Joined: Thu Oct 14, 2004 1:58 pm

Post by tet »

Well, defining a new document class seems to work fine.
However, sometimes I want to have just a short look into a
UTF-8 encoded XML file containing text from one of 20 languages of the world, including east asia languages.
For the moment it would be enough to have the UTF-8 sequences
be shown as Ãç¶ characters, i.e. interpreted as ANSI bytes.
This is even more important if I want to make changes for which the texts don't need to be displayed properly, e.g deleting some lines,
replacing some XML tag labels, adjusting XML attributes, and so on.
After editing, I want to save the file, of course. The text itself
was not readable - but it was not destroyed.
The problem is: This works fine as long as you use a Codepage encoding,
may be Win CP 936 or 950 or 1254 or whatever you like.
However, it does not work with UTF-8. I cant open UTF-8 files in ANSI mode, disabling the UTF-8 conversion. :(
Unless you make these tricks described in the previous posting (setting the font and charset for the document class), you will get these question marks and the text is destroyed. :x
Even if you use the file-open dialog and choose "ANSI" instead of "AUTO",
the UTF-8-autodetect feature will make its decision and textpad will spoil my text. :cry:

I think: Until textpad is a unicode editor one day, there should be a way
to enforce ANSI encoding handling on file open.
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

I think: Until textpad is a unicode editor one day, there should be a way
to enforce ANSI encoding handling on file open.
Does it not work if you select "ANSI" from the "Encoding" dropdown at the bottom of the file open dialog?
tet
Posts: 3
Joined: Thu Oct 14, 2004 1:58 pm

Post by tet »

No. If I select "ANSI" from the "Encoding" dropdown (file open dialog), it's just the same as if I use the "Default" setting.

Unless someone tells me a reason (like Microsofts "this is by design" apologies :? ) or shows me a workaround, I consider this to be a little, tiny bug.
However, it makes Textpad unusable in my situation. :(
Post Reply