Metapad unicode support. Needs testing.

All development related issues welcome

Moderator: Moderator Team

mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Metapad unicode support. Needs testing.

Post by mrugiero »

Hi, as some might know, I'm currently kind of working on Metapad's codebase. I read Unicode was a wanted feature, and found out there was an (incomplete) support for it. I think I completed it, but I need some testing. It works for me, but my language doesn't exactly make intensive use of non-ANSI characters, so I want (if possible) that someone with a more non-english characters use to test it. This is the lite build (edit control) with Unicode support. Please, note that the encoding conversion options were never completed, and don't work (I didn't try to make them work, yet, and I plan to make all the fancy features optional at build time). This should only make available unicode. Any testing helps (just tell me if something doesn't work correctly), be it on ReactOS or Windows. If someone wants to test it on ReactOS, please try the copy-paste feature, that was failing on ReactOS in the Rich Edit version (which copy-paste method is used for Unicode builds).

UPDATED 09/07/2013
Download the build here:
Lite Edition
Rich Edit

NOTE: I forgot to strip debug information, so the release builds are actually smaller than they weight in the links.
NOTE2: Please try tabulation. On WINE, I noticed it's at least twice the size it's supposed to be (detects correctly the number of characters it takes, but it's wider), on all build, but I think this might actually be a problem on WINE.
Last edited by mrugiero on Tue Jul 09, 2013 6:13 am, edited 2 times in total.
Yuntian Zhang
Posts: 11
Joined: Wed Apr 24, 2013 3:16 am

Re: Metapad unicode support. Needs testing.

Post by Yuntian Zhang »

Please post ReactOS related stuff here.

Try Chinese/Japanese/Korean for your program,
User avatar
gonzoMD
Posts: 1077
Joined: Fri Oct 20, 2006 7:49 am
Location: Germany
Contact:

Re: Metapad unicode support. Needs testing.

Post by gonzoMD »

Yuntian Zhang wrote:Please post ReactOS related stuff here.
It's ReactOS related. He is about to change the codebase of Metapad to learn and maybe replace ReactOS Notepad with his Metapad Fork.

You can read about it here
Yuntian Zhang
Posts: 11
Joined: Wed Apr 24, 2013 3:16 am

Re: Metapad unicode support. Needs testing.

Post by Yuntian Zhang »

gonzoMD wrote:
Yuntian Zhang wrote:Please post ReactOS related stuff here.
It's ReactOS related. He is about to change the codebase of Metapad to learn and maybe replace ReactOS Notepad with his Metapad Fork.

You can read about it here
Seems like it is very likely that MetaPad will become part of the ReactOS. Although IMHO, ReactOS should be simple and compact. The notepad we have right now meets those two rules. When I use notepad, I'll read some plain texts, and maybe make some modifications. That's all I want. Writing some codes? Use an IDE. Reading some novels? PDF reader. Notepad should work like a notepad, not Emacs, and give users freedom to choose whatever they want to use. They have a better understanding about what they need.

I can see MetaPad has more features than notepad, but who will need those? As a programmer, I use SciTE as my default editor and barely use other editors. MetaPad doesn't support syntax highlighting, so there isn't that much differences between notepad and MetaPad to me. My parents use MS Word only. If a program requires them to open xxx.ini and do something, they simply uninstall it or call me to uninstall it. Emacs is more powerful than notepad, and MATLAB is more powerful than calc, but they are designed for professional users. Since Emacs has more features than MetaPad, are we going to have Emacs instead of notepad? I hope this is not the case.

Sometimes what we need is just a notepad, period. I disagree to preinstall MetaPad instead of notepad. But if MetaPad can't run in ReactOS, that means we have a bug in OS. Instead of making some ReactOS-specific workarounds, figuring out what cause the problem will be much more helpful to our project, and this might help other similar programs to be able to run in ReactOS.
mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Metapad unicode support. Needs testing.

Post by mrugiero »

Yuntian Zhang wrote: Seems like it is very likely that MetaPad will become part of the ReactOS. Although IMHO, ReactOS should be simple and compact. The notepad we have right now meets those two rules. When I use notepad, I'll read some plain texts, and maybe make some modifications. That's all I want. Writing some codes? Use an IDE. Reading some novels? PDF reader. Notepad should work like a notepad, not Emacs, and give users freedom to choose whatever they want to use. They have a better understanding about what they need.

I can see MetaPad has more features than notepad, but who will need those? As a programmer, I use SciTE as my default editor and barely use other editors. MetaPad doesn't support syntax highlighting, so there isn't that much differences between notepad and MetaPad to me. My parents use MS Word only. If a program requires them to open xxx.ini and do something, they simply uninstall it or call me to uninstall it. Emacs is more powerful than notepad, and MATLAB is more powerful than calc, but they are designed for professional users. Since Emacs has more features than MetaPad, are we going to have Emacs instead of notepad? I hope this is not the case.

Sometimes what we need is just a notepad, period. I disagree to preinstall MetaPad instead of notepad. But if MetaPad can't run in ReactOS, that means we have a bug in OS. Instead of making some ReactOS-specific workarounds, figuring out what cause the problem will be much more helpful to our project, and this might help other similar programs to be able to run in ReactOS.
First, I don't think it's *that* likely that it will be used. I want it to, but AFAIK the only ones deeply involved with the devs that paid any attention to the idea are vicmarcal and Z98. I want to make the work regardless of it becoming the default or not, becaused I can learn from it, and I want to propose it officially after most of the work is done. Also, I'd really like a lightweight, open source and better featured notepad replacement. There are a few great ones but they're either closed source or not really lightweight.
Second, I don't know where you get that it's anything like emacs or something like that.

For the moment, I only plan to add a tabbed UI (which will be optional at build time, because I see this might conflict with what ReactOS devs might want), word lines and characters count and multiple encodings and line breaks support. I want to complete any support tagged as experimental as well.
Syntax highlighting is something I want, but I'll only make it if I achieve to make it relatively simple and with no extra dependencies. My focus is making it lightweight. If I do it, it will also be optional, enabled with a compile time switch.

The focus for *right now* is cleaning it up, giving it some readability and structure, and learning enough to maintain it (as someone said that merging it is only an option if I'm willing to maintain it) and completing the basic missing features, with special interest in Unicode support.
I'm also trying to solve some bugs that were simply hacked away.

Also, I'm not planning on making any ReactOS specific workarounds. The only possible workaround would be having a different CMakeLists for ReactOS, with the specific default configuration needed by them, although this could be done with a toolchain file.
PurpleGurl
Posts: 1790
Joined: Fri Aug 07, 2009 5:11 am
Location: USA

Re: Metapad unicode support. Needs testing.

Post by PurpleGurl »

Notepad should remain simple. That said, Wordpad should have more features, per Windows convention. Like why not take Write from OOO and adapt it or something? Maybe remove some things to make it more lightweight and give it a L&F similar to the rest of Reactos. Now, if someone has something good that won't fit into ROS, it could be listed in RAPPs or something.
erkinalp
Posts: 861
Joined: Sat Dec 20, 2008 5:55 pm
Location: Izmir, TR

Re: Metapad unicode support. Needs testing.

Post by erkinalp »

Notepad should remain simple. That said, Wordpad should have more features, per Windows convention.
We will probably not have WordPad, but LibreOffice Writer-like fully-functional word processor will be useful, LOo requires cygwin and VisualStudio, and a rewrite will take too long because the funcionality is too broad.
mrugiero wrote:I think a modified Abiword would fit better as a ReactOS Wordpad.
I have seen users almost never use WordPad. Instead, they install an office package including full flegded word processor(85% install MS Office-either pre- or post-installed). There comes the features in WordPad will not suffice and we need a built-in full fledged word processor.
Last edited by erkinalp on Sat Jul 20, 2013 9:17 pm, edited 1 time in total.
-uses Ubuntu+GNOME 3 GNU/Linux
-likes Free (as in freedom) and Open Source Detergents
-favors open source of Windows 10 under GPL2
mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Metapad unicode support. Needs testing.

Post by mrugiero »

I think a modified Abiword would fit better as a ReactOS Wordpad.
vicmarcal
Test Team
Posts: 2733
Joined: Mon Jul 07, 2008 12:35 pm

Re: Metapad unicode support. Needs testing.

Post by vicmarcal »

mrugiero wrote:Hi, as some might know, I'm currently kind of working on Metapad's codebase..
Hi!
Really nice work!
It works pretty nice. CopyPaste still doesnt work, and TAB neither.
[ external image ]

I always dreamt of a Notepad.exe which has an Advanced mode, so extra features appears. In the same way Windows has a Calculator, and it has a Scientific mode which adds new features. That way Noobs, will feel comfortable with ReactOS Notepad.exe and those who wants more power, can just activate the Metapad Advanced mode. It should be easy to implement in Metapad.exe and probably following that road it will have more chances to replace Notepad.exe, since it doesnt kill the user experience but adds extra features if the user is advanced :)
mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Metapad unicode support. Needs testing.

Post by mrugiero »

vicmarcal wrote: Hi!
Really nice work!
Hi! Just to let you know, I'm still working, but at a slower pace than before (last semester was kind of vacation, but this one I'm actually going to class and working, and a bit lazy on the code :p).
It works pretty nice. CopyPaste still doesnt work, and TAB neither.
Actually, I haven't really looked into the copypaste problem. I do have sort of a test case (almost the same I already sent you, but a few things are corrected). On the tab, I don't think you mentioned it before. I did notice a bug there, at least when running on WINE, that makes tabs at least twice as big as they should be, and I didn't really get to it. It happens to appear on all of the different build options.
I always dreamt of a Notepad.exe which has an Advanced mode, so extra features appears. In the same way Windows has a Calculator, and it has a Scientific mode which adds new features. That way Noobs, will feel comfortable with ReactOS Notepad.exe and those who wants more power, can just activate the Metapad Advanced mode. It should be easy to implement in Metapad.exe and probably following that road it will have more chances to replace Notepad.exe, since it doesnt kill the user experience but adds extra features if the user is advanced :)
There are features I plan to implement, and some others that I'm thinking about but haven't decided; I want to complete the partially implemented features, though there are some of them for which I don't quite get what was the intention, yet. Right now, I'm rewriting the handling of file saving and loading to be more modular and to actually allow for different encodings and line breaks. The saving functions are already correctly (or at least, sort of) implemented, but I need to change the GUI behavior, and I'm currently procrastinating it, as well as encoding detection for loading.
The features I thought of are, first, top priority (because that's the one I like the most, but I will first work on the general refactoring because otherwise it will be harder), tabbed interface. I really want to be able to use tabs, as I do with gedit. However, I want to make sure that I can disable it on build time, for people that want the regular interface (also, I think the tabbed interface wouldn't be suitable for including as part of vanilla ReactOS, since that would be a major difference in look and feel to MS Notepad). The other big feature, but this one I'm not even sure if I really want to implement it, is syntax highliting. I mean, it's been asked for long time, but it's kind of overkill. Also, the lite edition (edit control) would need a custom control to work. I've seen a few implementations on rich edit, so that one is more likely happen at some point.

If anyone wants to propose a feature, I'll look into it.

EDIT: I'm totally saving the screenshot :)
erkinalp
Posts: 861
Joined: Sat Dec 20, 2008 5:55 pm
Location: Izmir, TR

Re: Metapad unicode support. Needs testing.

Post by erkinalp »

mrugiero wrote:tabbed interface. I really want to be able to use tabs, as I do with gedit. However, I want to make sure that I can disable it on build time, for people that want the regular interface
I like this feature too. Also the ability to set the line breaks(CR,CR+LF,LF,LF+CR,NEL) is necessary so we can nove our txt file without problems.(FYI, Windows Notepad just ignores non-CR+LF linebreaks)
-uses Ubuntu+GNOME 3 GNU/Linux
-likes Free (as in freedom) and Open Source Detergents
-favors open source of Windows 10 under GPL2
mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Metapad unicode support. Needs testing.

Post by mrugiero »

erkinalp wrote:
mrugiero wrote:tabbed interface. I really want to be able to use tabs, as I do with gedit. However, I want to make sure that I can disable it on build time, for people that want the regular interface
I like this feature too. Also the ability to set the line breaks(CR,CR+LF,LF,LF+CR,NEL) is necessary so we can nove our txt file without problems.(FYI, Windows Notepad just ignores non-CR+LF linebreaks)
Last time I worked with it (a long time ago; I'll resume work, eventually, but probably not before end of year), I was fixing exactly that. It was poorly handled by the original application, as it assumed a given line break was associated to a given encoding, and the user didn't have a say about it. I don't know about NEL line breaks, though.
erkinalp
Posts: 861
Joined: Sat Dec 20, 2008 5:55 pm
Location: Izmir, TR

Re: Metapad unicode support. Needs testing.

Post by erkinalp »

These are what Unicode requires to be fully conformant:

Code: Select all

    LF:    Line Feed, U+000A
     VT:    Vertical Tab, U+000B
     FF:    Form Feed, U+000C
     CR:    Carriage Return, U+000D
     CR+LF: CR (U+000D) followed by LF (U+000A)
     NEL:   Next Line, U+0085
     LS:    Line Separator, U+2028
     PS:    Paragraph Separator, U+2029
I have also listed LF+CR line ending as it is used to end the line on paper but does not terminate the command line on MS-DOS .FF, VT, and PS should be implemented as unselectable blank lines after the line ending
Last edited by erkinalp on Wed Jul 16, 2014 8:47 pm, edited 1 time in total.
-uses Ubuntu+GNOME 3 GNU/Linux
-likes Free (as in freedom) and Open Source Detergents
-favors open source of Windows 10 under GPL2
middings
Posts: 1073
Joined: Tue May 07, 2013 9:18 pm
Location: California, USA

Re: Metapad unicode support. Needs testing.

Post by middings »

PurpleGurl wrote:(To replace Wordpad) why not take Write from OOO and adapt it or something? Maybe remove some things to make it more lightweight...
Open Office Write can't be easily split from the rest of the Open Office suite because the applications in the suite are tightly integrated. OOO Write is not like MS Office's Word, a separate program that can be run independently of the rest of MS Office. During installation, unchecking one of the Open Office applications only prevents the application's icon from being shown. The code for the application gets installed anyway.
mrugiero
Posts: 482
Joined: Sun Feb 14, 2010 9:12 am

Re: Metapad unicode support. Needs testing.

Post by mrugiero »

erkinalp wrote:These are what Unicode requires to be fully conformant:

Code: Select all

    LF:    Line Feed, U+000A
     VT:    Vertical Tab, U+000B
     FF:    Form Feed, U+000C
     CR:    Carriage Return, U+000D
     CR+LF: CR (U+000D) followed by LF (U+000A)
     NEL:   Next Line, U+0085
     LS:    Line Separator, U+2028
     PS:    Paragraph Separator, U+2029
I have also listed LF+CR line ending as it is used to end the line on paper but does not terminate the command line on MS-DOS .FF, VT, and PS should be implemented as unselectable blank lines after the line ending
IIRC, LF+CR was used on older Mac systems as the line break. CR alone was also used in other system, but I'm not sure which right now, I believe I wrote it down when I was working on it. Anyway, I'll make sure to add the missing line breaks when I resume work, it shouldn't be too hard. Another missing piece, I think, is handling codes above the BMP, as the previous, unfinished, implementation assumed two bytes per character (true for BMP, but false for everything above).
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests