Is there a Google Chrome switch (command line) to toggle url-encoding?

2,777 views
Skip to first unread message

Hatef Keshvadi

unread,
Mar 16, 2017, 2:45:22 AM3/16/17
to Chromium-discuss
I have written a C# code that calls Google Chrome to load a specific url on the computers local hard drive. The C# code already encodes the URL (replaces space characters with %20) and this used to work fine until a couple of weeks ago that this issue started happening!


The quickest band-aid seems to be modifying the C# code to not replace " " with %20. But the Chrome behavior may change in the future or some customers may not have the same version/settings of the chrome installed.


I think the sustainable solution is to Tell Chrome to either Encode or not encode the URL. Now my question is:


Is there a Chrome switch that enforces it to either translate the url or ignore it?

Does it have a setting or option for this?


I have found a couple of lists with Chrome Switches Here and Here. However both of these lists are incomplete and refer to this reference.

I have Ctrl+F'ed for "URL" and "URI" but did not come across a relevant answer.

Thanks in advance.



http://stackoverflow.com/questions/42814191/is-there-a-google-chrome-switch-command-line-to-toggle-url-encoding


PhistucK

unread,
Mar 16, 2017, 2:48:50 AM3/16/17
to hat...@gmail.com, Chromium-discuss
I am pretty sure you cannot change this in any way.
However, does your code work with other browsers? It is expected the all of the browsers open URLs more or less the same way, even from the command line, because when they are the default browser, they receive URL in the same encoding.

If it works with other browsers and you are sure it worked with Chrome, it might be an unintended regression.
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Hatef Keshvadi

unread,
Mar 16, 2017, 10:56:32 AM3/16/17
to PhistucK, Chromium-discuss
Good morning and thanks for the email.

(Normally clients give us brand new laptops to install and test our software suite on them) Since our JavaScriptI have never used it on other browsers and Chrome was the only option we required our customers to choose. Even I had downloaded a standalone version of Chrome  installer and would hand it to the clients to use that. the Chrome from that installer used to work just fine. However, recently, after a couple of successful calls to that specific URL, chrome suddenly starts changing the URLs (that my c# code already has changed!)

I think Chrome maybe updating itself in the background and then it does this!

Can you explain this in a bit more detail: "It is expected the all of the browsers open URLs more or less the same way, even from the command line, because when they are the default browser, they receive URL in the same encoding."

Best and thank you very much.

PhistucK

unread,
Mar 16, 2017, 11:01:34 AM3/16/17
to Hatef Keshvadi, Chromium-discuss
Chrome is indeed updating itself in the background.

It is expected (on Windows, at least) that when you click on files with the URL extension, or go to Start > Run and type http://www.com, the default browser will run with the URL (in certain encoding defined by the operating system). So it will use the same encoding, regardless of the browser, which is why browsers usually expect the same encoding.


PhistucK

Hatef Keshvadi

unread,
Mar 16, 2017, 11:06:19 AM3/16/17
to PhistucK, Chromium-discuss
Thanks Phistuck.

So, is this an OS issue? Do I have to toggle a windows settings? If so, then why the behavior changes over a short period of time? It should have been like that (double translating the URL) from the moment I installed Chrome.

PhistucK

unread,
Mar 16, 2017, 11:15:01 AM3/16/17
to Hatef Keshvadi, Chromium-discuss
I do not know whether this is an operating system issue, which is why I suggested that you try it with other browsers.
Anyway, I do not expect it to be an operating system setting.
Chrome updates, but Windows updates as well, so who knows.
You can see what is actually being sent to the browser in the command line by going to chrome://version and look at the "Command line" field.

Again, if you verified that the rest of the browsers do not reproduce the issue, it might just be a Chrome issue, in which case, use crbug.com as I instructed earlier.


PhistucK

Hatef Keshvadi

unread,
Mar 20, 2017, 12:18:12 PM3/20/17
to PhistucK, Chromium-discuss
Adding "file://" to the url does exactly what Im looking for.

Thanks and Happy Norouz!
Reply all
Reply to author
Forward
0 new messages