Re: Question about unicode support...
Brought to you by:
set
From: salvador <sal...@in...> - 2001-09-25 18:52:50
|
Grzegorz Adam Hankiewicz wrote: > I've seen through the poll at sourceforge that unicode support or something > similar is 'brewing' in the mind of SET. I have however some more urgent > needs. At the moment I have some plain text files in utf8 which I would > like to edit. The problem is really at the storege point, because all of > their characters are really in my viewing codepage. True, that's a common problem when you use libraries like Allegro. > So I could use a script similar to the 'e' alias which before converting > the file converts it to latin1, and when I exit it's converted back to > utf8. It's an ugly hack, and may work for some files. There are may > problems, like what happens if I try to open another file inside the > editor, what happens if the editor crashes (the original is left in > latin), what if the file has non-viewable characters, etc, etc. > > I then figured out that it would be nicer to use the manual "recode" > option, which gives me more freedom, and so will I do (for now). But I > also found out that this option is not very customizable, there are a > lot of conversions I do frequently and I would love to add kind of > "shortcuts" to this menu, or even better, trigger them with the macro > menu. What kind of recodes? you mean like PC850->ISO-8859-1? Perhaps an sLisp command (RecodeBuffer from to)? > Also, sometimes I would prefer to feed the selected text to an external > program, because I might be doing a character conversion from utf8->latin > which leaves the non-viewable utf characters as html encodings so that I > can convert back to utf8 without loosing characters, and I can customize > much better the conversion through the external program without > requesting more features to the editor :) You can do it with sLisp, you have GetSelection and you have RunProgram. In fact Lemur works by selecting the word under cursor, passing it to an external exe that calls gcc to preprocess the code and returns a list to choose. > Remember SET when I suggested about a combo-key which would word wrap > some lines of text, usually in email posts like this one? Well, you could > use the "feed lines to external program" to solve this, and people could > provide a program doing the formatting, in fact, the basic formatting > could be done with the GNU fmt program. Since only text has to be passed > from setedit to the extension, you could do this with a read/write pipe, > and detect failures with return codes. Maybe, but please first check the available options. I can add more, but only if necesary. > Another point, why not add the "decode block quoted printable" to the > "recode" option? Sometimes it may come handy to be able to encode it back > to the mail form. Something similar could be done with the "html accents", > which would reduce the length of the Tools menu. The answer is quite simple: the dialog offers recodings that are 1 to 1, one character at the input will generate one character at the output. HTML and quoted printable aren't different. The difference is huge. In the first case the editor doesn't need to modify the size of the buffer or recompute any lines information, but the second is a major change. Of course I could mix both in the list and separate them internally, but it means adding more code and information to the lists. I'll put this join in the todo, but with low priority. About the "encode quoted printable", looks like a needed option. Now another detail: I have in my todo the following: Add import/export in UNICODE/UTF-8 format. So you could import an UTF-8 file and then export it to UTF-8, not as comfortable as a transparent Load/Save but quite useful I think. > PD: Resist the temptation to send me copies of your mailing list answers :) This time you are saved, but I can promess I'll remmeber it forever ;-) SET -- Salvador Eduardo Tropea (SET). (Electronics Engineer) Visit my home page: http://welcome.to/SetSoft or http://www.geocities.com/SiliconValley/Vista/6552/ Alternative e-mail: se...@co... se...@ie... Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA Phone: +(5411) 4759 0013 |