> But as I said, the message shown to the user is wrong. There is no "invalid 
> byte sequence" in the original text. It should say something like "the 
> original text contains symbols that can't be translated into the requested 
> encoding". Giving misleading information during an error is a bug in itself.

The error message is from Glib as your OP said, not Geany, so you need to raise 
that issue there, but I suspect its probably actually from the underlying iconv 
or ICU library, don't know what Glib uses on windows.  Maybe the error message 
makes sense at that level where it is converting byte sequences and the byte 
sequence in the input is invalid in the output?

Geany spends all its time trying to preserve the users data, so its not going 
to let you save in a way that does not preserve content.  Save in an encoding 
that supports the relevant characters then convert with specialised tools if 
you want to.

> the only other option is to remove those symbols by hand.

Correct, Geany is not a transliteration program, changes can only be made by 
users.  

For what you are trying to do you really need a transliteration program like 
[uconv](https://linux.die.net/man/1/uconv) (part of 
[ICU](https://en.wikipedia.org/wiki/International_Components_for_Unicode) IIUC) 
that can be told what to do with untranslatable data.  Adding actions that are 
rarely used to Geany just complicates it more, and makes more work for the 
volunteers that support it, better to use the right tool for rare operations.  
Beat it with a :hammer: not a :screwdriver: :grinning: 


-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/3792#issuecomment-2005733483
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/3792/[email protected]>

Reply via email to