@b4n the only one that I would question is the one that @eht16 had questioned,
so I was waiting until that was decided. :-P
"Data contains NULs" is referring to the result of the conversion, but the user
doesn't know that, they only have the input file and it may not contain NULs,
eg it might
@elextr Tell me if there are still strings to be updated or better error to
report, I can make another follow-up :wink:
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3716#issuecomment-2068175821
You are receiving this because you are subscribed to
Merged #3716 into master.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3716#event-12551817780
You are receiving this because you are subscribed to this thread.
Message ID:
@b4n commented on this pull request.
> geany_debug("Couldn't convert from %s to UTF-8.",
> charset);
+ g_set_error(error, G_CONVERT_ERROR,
G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+ _("Data contains NULs"));
Yes, if
@eht16 commented on this pull request.
> geany_debug("Couldn't convert from %s to UTF-8.",
> charset);
+ g_set_error(error, G_CONVERT_ERROR,
G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
+ _("Data contains NULs"));
Do we
There are actually some encodings which seem not support on Windows:
```
15:31:32.356445: Geany INFO : Encoding ISO-8859-10 is not supported
by the system
15:31:32.356445: Geany INFO : Encoding ISO-8859-14 is not supported
by the system
15:31:32.356445: Geany INFO
@elextr I'll pour it as soon as this gets merged ;) (unless I find out there's
no dependency between the two, in case I can get those to cure in parallel)
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3716#issuecomment-1853012073
You are receiving
> All this commenting is for the future PR with it, no point in discussing thin
> air, it's confusing for no reason ;)
Ok, waiting for separate concrete :smile:
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3716#issuecomment-1852998898
You are
> But I disagree that its the same as the encoding selection in the open dialog
I'm not saying it's the same, just that we have the code for generating the
combo box with the additional item as used in that dialog, so I don't even have
to add this.
All this commenting is for the future PR with
> @elextr it's already in the open dialog, and I'm not gonna move anything. I'm
> just gonna merge Use fixed encoding when opening non-Unicode files checkbox
> and Default encoding (existing non-Unicode files) combo, only keeping the
> combo and having an additional Detect from file item in it
> I count the more proper error message as cosmetic compared to the other
> fixes.
And as you may have guessed I see them as fixes, so of course I say all in
together :wink:
Will check the strings as soon as I find my purple editing pencil.
--
Reply to this email directly or view it on
@elextr it's already in the open dialog, and I'm not gonna move anything. I'm
just gonna merge *Use fixed encoding when opening non-Unicode files* checkbox
and *Default encoding (existing non-Unicode files)* combo, only keeping the
combo and having an additional *Detect from file* item in it
> Use fixed encoding when opening non-Unicode files. It's useful, but we have
> code for adding a Detect from file entry directly in the combo box, as used
> in the file Open dialog. Using this there as well instead of having a
> separate checkbox strikes me as an improvement: simpler UI with
> In the end thats all I am suggesting adding now.
Done (plus a couple of weird loop I just couldn't let be). Let me know how I
should update all strings :wink:
> Which one? I only found "encoding of new files" and "use fixed encoding" both
> of which seem useful?
*Use fixed encoding when
@b4n pushed 2 commits.
effe633ef710c690eeff4bb37ce5ce1d13d1c8fc Small code cleanup
053667e3a95650691f1a48673c94794d98b1da37 Report actual error to the caller in
encodings_convert_to_utf8_auto()
--
View it on GitHub:
> or should we keep the "fix encodings conversion" separate from the more
> cosmetic stuff?
Well, ATM its just tests and fixes AFAICT, not sure what you see as "cosmetic"?
PS sure its several fixes, but they are all just part of making encoding work
correctly, or as correctly as it can be made
> including propagating the error better as you wished, as well as not showing
> knowingly unsupported encodings in the UI
In the end thats all I am suggesting adding now.
> removing a unnecessary control in the preferences regarding file encodings.
Which one? I only found encoding of new
> A perfectly good thing to put in a PR called "Various encodings conversion
> fixes" he says hopefully? Maybe the lowest level function could display the
> message if it was `force` otherwise don't worry about it because its just
> Geany trying all encodings it knows again ;-)
Would you
> It's (almost, but is for all practical purposes) documented as using
> g_iconv(), which is documented as using iconv() or libiconv as fallback.
Ok, the
[code-ocumentation](https://github.com/GNOME/glib/blob/main/glib/gconvert.c)
shows its iconv all the way, not a #ifdef windows in sight :-)
> > Anyhow, yes, this could be improved, and ideally we'd probably not display
> > the encoding in the list if it's not supported by the library we use
> > (iconv), as it makes little sense then.
>
> Would be nice but IIRC last time we discussed this there was no easy way of
> finding what was
> Anyhow, yes, this could be improved, and ideally we'd probably not display
> the encoding in the list if it's not supported by the library we use (iconv),
> as it makes little sense then.
Would be nice but IIRC last time we discussed this there was no easy way of
finding what was supported
> Several of these messages appear:
>
> ```
> # Geany-INFO: Couldn't convert from ISO-8859-8-I to UTF-8 (Conversion from
> character set “ISO-8859-8-I” to “UTF-8” is not supported).
> ```
>
> What that points out is that Geany has a fixed list of conversions, which are
> exposed to user
> that joy of having multiple build systems to maintain is back
Feel free to remove autotools :wink:
Anyway, tests seem to pass, although with 10 billion[^1] `Geany-INFO` messages.
Several of these messages appear:
```
# Geany-INFO: Couldn't convert from ISO-8859-8-I to UTF-8 (Conversion from
> Compiles ok, but encoding tests not made because not in `tests/meson.build`
Oopsie, fixed. Aaah, that joy of having multiple build systems to maintain is
back, I almost forgot it after Waf bit the dust…
--
Reply to this email directly or view it on GitHub:
@b4n pushed 1 commit.
9b054d16b4ed54de2486c6762ea00478f041b08c meson: Add encodings test
--
View it on GitHub:
https://github.com/geany/geany/pull/3716/files/cb68cdb2f1b5c544b3235edde3bb12f149360fe7..9b054d16b4ed54de2486c6762ea00478f041b08c
You are receiving this because you are subscribed to
LGBI, I didn't inspect the test code more than a (very) quick skim. Compiles
ok, but encoding tests not made because not in `tests/meson.build` and being an
ASCII locale I have no other encodings, so untested.
The whole encodings thing is still a mess, but its now looks a more correct
mess
26 matches
Mail list logo