* Gitweb error: XML Parsing Error: not well-formed
@ 2015-02-20 15:17 Juan J. Martinez
0 siblings, 0 replies; only message in thread
From: Juan J. Martinez @ 2015-02-20 15:17 UTC (permalink / raw)
To: git
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1654 bytes --]
Hi,
I'm experiencing a problem with gitweb and some utf-8 bits like £ (the
pound sign) when showing diffs.
Example (Firefox's output):
XML Parsing Error: not well-formed Location:
https://hostname/gitweb?p=redacted.git;a=commitdiff;h=16ae27d6b030949772b298c6e2935a09c48169a7
Line Number 913, Column 492:<div class="diff chunk_header"><span
class="chunk_info">@@ <a class="list"
href="/gitweb?p=redacted.git;a=blob;f=redacted/redacted.py;h=ce79b086288b96e6dd25d0f0bfb5b5018cca6fe0#l1043">-1043,7</a>
<a class="list"
href="/gitweb?p=redacted.git;a=blob;f=redacted/redacted.py;h=774c74b703a7d211fe19433236d1745ac7d7697c;hb=16ae27d6b030949772b298c6e2935a09c48169a7#l1044">+1044,7</a>
@@</span><span
class="section"> outstanding amount is ï¿¿10.00.</span></div>
That should be "£10.00".
This is with latest gitweb code
(sha:f3f407747c1cce420ae4b4857c4a6806efe38680) and perl v5.10.1.
The problem seems to be in gitweb.perl around line 1543.
Looks like utf8::is_utf8 returns false, and the conversion "in place"
with utf8::decode doesn't seem to work (although it returns success,
Firefox doesn't like it).
As a workaround I removed the "|| utf8::decode($str)" on the condition
and the error is gone, although I'm not sure about the consequences of
doing that (I guess it returns part of the content in the fallback
encoding; latin1 in this case).
Regards,
Juan
--
Juan J. Martinez
Development Manager, MEMSET
mail: juan@memset.com
web: http://www.memset.com/
Memset Ltd., registration number 4504980.
Building 87, Dunsfold Park, Stovolds Hill, Cranleigh, Surrey GU6 8TB, UK.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-20 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 15:17 Gitweb error: XML Parsing Error: not well-formed Juan J. Martinez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).