eteran / nedit-ng

a Qt5 port of the NEdit using modern C++14
GNU General Public License v2.0
95 stars 26 forks source link

Accents in files should be supported (Unicode support) #31

Open ericxuo opened 6 years ago

ericxuo commented 6 years ago

Hi,

When I want to write a text file in french, accentuated letters are not supported (this was already the case with the native nedit). Ex : I want to write 'é' or 'à'. I get what is displayed in the attached file. Is there any solution for this issue ?

Regards.

Xuo.

accents

eteran commented 6 years ago

If I understand you correctly, you are saying that both nedit and nedit-ng do not support certain characters that are outside of the ASCII character range? I definitely plan to add things like UTF-8 support, but it will not be a small change, so it will take some time in both design and implementation.

ericxuo commented 6 years ago

Hi, Yes, this is what I say. Both nedit and nedit-ng do not support (at least) accentuated characters, and probably others. Xuo.

ericxuo commented 6 years ago

Hi,

Here is a picture to help understand what happens (not to add any pressure, of course) :

capture d ecran_2018-05-15_21-00-07

Instead of /home/eric/Téléchargements

Regards.

Xuo.

eteran commented 6 years ago

Right. At the moment, text in the editor view is rendered as if it were using Latin-1. Adding generalized support for Unicode will be very complicated.

For example, when the user simply clicks in the editor, a non-trivial amount of work needs to be done to figure out which character they clicked on since it isn't just a simply byte offset anymore. I plan to get there eventually, but it is going to be complicated :-).

ericxuo commented 5 years ago

Hi,

Here is a fork (??) of nedit which has implemented UTF-8 support (https://github.com/unixwork/xnedit). This may help you in case you still think about it :smile:

Regards.

Xuo.

eteran commented 5 years ago

I discovered xnedit yesterday. It looks very promising as inspiration on how to get Unicode support into nedit-ng. It's definitely in the plan!