On 12/7/2007 5:36:02 PM, Ian Binnie wrote:
>
>I have been doing quite a few conversions myself.
>
>It is just a single API call to convert one buffer to another.
>
>A Vedit macro would be much more complex. It doesn't make sense not to do
>this in Vedit. I believe Ted indicated he was going to implement this when it
>was last discussed a couple of years ago.
The problem with using API for the conversion is that it destroys any characters that are not found in 8-bit character set. With a Vedit macro, you could convert them for example into HTML entities.
Anyway, it would be nice to have an API call option in the macro language (similar to Sys_Call() and Sys_Int()). This could be used for the Unicode conversion, but I think there would be many other uses, too. For example, call the color picker to get color value for HTML.
By the way, I just tried the macro function Sys_Reg_Address(0) to get the address of T-Reg 0, but Vedit says "Invalid command". Has this command been removed? Or is it in DOS version only? It is still in Help.
Another thing I found about UTF-8: If you copy UTF-8 text from web browser to clipboard, and then paste it to Vedit, any non-ANSI characters are replaced with question marks. ANSI characters such as Ö and Ä are displayed correctly. It seems that Windows performs automatic conversion when pasting from clipboard. This means that any non-ANSI characters are lost. (Notepad automatically display Unicode characters when pasted, even if you do not have an Unicode file open.)
Example of multi language text using UTF-8 can be found on this Wikipedia page:
http://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Command_line_tools
I wonder if it would be possible to have some kind of "paste special" that would retain the multibyte characters?
Of course it would be best to have real Unicode support.
--
Pauli
|
|