there are more elegant ways, but for you to get a quick proof of concept,
try something like this:
var src=document.body.innerHTML;
src.replace("&","&");
document.body.innerHTML=src;
would replace the html source code & with &
anything that you can see with view source you ought to be able to replace
with something else, it's not on a hex level though, so you need to find the
entity in view source and copy and paste whatever it there.
Ideally you don't use the entire document.body and avoid innerHTML
You're probably better off asking the website fix it
On Tue, Jul 26, 2011 at 6:01 PM, Laurin <[email protected]> wrote:
> Hi,
> is it possible to search for and rewrite hex values of a site using
> greasemonkey?
> There is a site that uses both, japanese characters and german
> umlauts. The umlauts are encoded in ascii (ISO) but the japanese
> characters are encoded in UTF-8, so every browser does encode one of
> them incorrect.
> So I would like to search for the hex codes of the umlauts in the
> german part of the site and replace them with UTF-8 codes before they
> are encoded.
> It works when I manually edit a downloaded copy with a hex editor, but
> since it is an interactive page I need a way to do it on the fly.
>
> Kind regards
> Laurin
>
> By the way, as a user and developer I really want to kick any web
> designer's (and of course database admin's) arse when they mix
> encodings like that...
>
> --
> You received this message because you are subscribed to the Google Groups
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en.