Url encoding problem in Safari vs. Chrome - google-chrome

When I paste this url in the Safari address bar, the result I get is mangled - the text-to-speech is pronouncing characters that aren't there (like the copyright sign). But when I paste the url in Chrome, I get the correct response (which is an mp3 of the pronunciation of the word "éliminé".)
It looks like Safari unescapes the string before sending.
What goes wrong in Safari, and is there a fix?

Related

Why is Safari rendering my TM symbol as â„¢?

I was sent an HTML file to evaluate. The first line looks like:
<h1>myCompanyName<sup>™</sup></h1>
Which renders as myCompanyName™.
When I open this file in Chrome or Firefox, the trademark symbol renders fine. However, in Safari, it renders like:
myCompanyNameâ„¢.
Why is Safari interpreting this small 'TM' as â„¢ , and what can I do to avoid this?
Interestingly, if I paste this same code into a Visual Studio Code web app and serve it, it renders properly on all browsers regardless. Only when opening the HTML file on its own via 'open with browser' does it mess up in Safari.
The encoding isn't declared correctly. A UTF-8-encoded ™ decoded as Windows-1252 displays as â„¢.
A proof using Python:
>>> print('™'.encode('utf8').decode('windows-1252'))
â„¢
Try, as a minimum:
<meta charset="utf-8"><h1>myCompanyName<sup>™</sup></h1>

Why Chrome dev tools mangles base64 image values?

I'd like to know why base64 images are mangled in Chrome's dev tools Watch values:
When I right click on the underlined value -> "copy value" Chrome decides to remove a GREAT part of the original base64 code, and to add "..." in between, destroying the base64 encoding
After making a text diff between what I've obtained from Chrome dev tools and the base64 data that reaches the server and I found there was a huge part of the text missing on what Chrome shows as the value and the infamous "..." (indicating that there should be more code in between i guess) that should't be there either
So What should I do to be able to retreive the proper value of a base64 image on Chrome dev tools?

Saving base64 string as PDF at client side Internet Explorer 10 and above

I am working on Saving base64 string as PDF at client side using 'data:application/pdf;base64,' with JavaScript.
For Example Anchor tag for Download PDF on browser looks like this :
<a id="openPdf" rel="openPdf" href="data:application/pdf;base64,JVBERi0xLjQKJfbk/N8KMSAwIG9iago8PAobQogL0ltM==" download="1199_07112014_P.pdf">Download PDF</a>
(The above HTML snippet data is deleted so its not a valid pdf )
It is working fine in Chrome and Firefox but its breaking in IE10 and above.
Can anyone please suggest to find a solution on this?

Chrome not recognising attachment filename

We have a web application which offers a file named L_2804071.key for download. The download works fine in Internet Explorer and FireFox but in Chrome it "loses" the filename and chrome does not seem to recognize the filename in the content-disposition header.
Here is the full header (identical in both browsers):
content-disposition: attachment; =?utf-16le?B?ZmlsZW5hbWU9TF8yODA0MDcxLmtleQ==?=
I don't know if this helps but if you decode =?utf-16le?B?ZmlsZW5hbWU9TF8yODA0MDcxLmtleQ==?= you get Wfilename=L_2804071.key which looks weird. Not sure where the "W" comes from but IE seems to work with it and downloads a file named L_2804071.key.
Fix the web application to return a Content-Disposition header field that follows the spec, your example is invalid (for starters, there's no "filename" parameter). Note that your example appears to use RFC2047-style encoding, which in general isn't used in Content-Disposition.
See http://greenbytes.de/tech/webdav/rfc6266.html for details.

How can I see how the browser percent-encoded my URL? (which is not visible on address bar)

When I paste a url containing some reserved characters to the address bar of IE, FF, Chrome, I see that it displays it as it is but as far as I understand in uses percent-encoding in the background.
How can I see in IE, FF and Chrome how the browser encoded the url?
Is it possible?
P.S: The reason I want to check this is I have a feeling my url is encoded differently in IE and FF and Chrome -so that it only works in IE.
Put the URL into an HTML page, ie,
click
Load in each browser, right-click, copy URL, paste into a text app or the address bar.
You can also use:
<script>
alert(encodeURIComponent('the text you want to see encoded'));
</script>
Copy the URL from the browser’s address bar and paste it into a text document.