Yeah, I know.

@eht16 I guess this is one of the reasons why *spawn* didn't use `W` variants 
(as it has a comment about encoding conversion):

>  GLib converts the argument vector to UNICODE. For non-UTF8 arguments, the 
> result is often "Invalid string in argument vector at %d: %s: Invalid byte 
> sequence in conversion input" (YMMV). Our tools (make, grep, gcc, ...) are 
> "ANSI", so converting to UNICODE and then back only causes problems.

The thing is that to pass in the search string, we try and pass the binary 
representation in the specified encoding for the search.  That works OK so long 
as the spawn code accepts arbitrary byte sequences (well, 0-terminated only), 
but not if it has to be valid.
Not doing the input conversion on Windows seems to work OK for the input part, 
not so much in better results or output.  Maybe we could mess a little with 
`LC_CTYPE` and set it to `LC_CTYPE=${LC_CTYPE%.*}.ourencoding`, maybe it'd 
help.  Or maybe not, I don't know.

I guess this issue is an argument for @codebrainz's proposition of rewriting 
this with custom code ^^

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

Reply via email to