[Clipart] [Bug 3867] Bad character encoding for submited files

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 23 08:14:47 PDT 2005


Please do not reply to this email: if you want to comment on the bug, go to    
       
the URL shown below and enter yourcomments there.     
   
https://bugs.freedesktop.org/show_bug.cgi?id=3867          
     




------- Additional Comments From sas00003 at btinternet.com  2005-08-23 08:14 -------
Jonadab writes:

> >    étoile

> Does SVGscan find these?

No, because there isn't really anything wrong with it, it's just not what was
intended. I suppose I could add a
looks_suspiciously_like_an_html_entity_with_the_ampersand_escaped test.

> Someone told me that I should look at the Encode module,

That was me.

> However, this documentation is hairy and scary and contains stuff like this:
> > CAVEAT: When you run $octets = encode("utf8", $string), then $octets may
> > not be equal to $string. Though they both contain the same data, the utf8
> > flag for $octets is always off. When you encode anything, utf8 flag of 
> > the result is always off, even when it contains completely valid utf8
> > string. See "The UTF-8 flag" below.

Yes, but you shouldn't use encode(), so this isn't a problem.

The way I see it working is like this:

When you get metadata from the form, the encoding should be specified in the
HTTP header. Using this information with the decode() function you can decode
the metadata, that is, convert it to Perl's internal format. (The metadata you
get from SVG::Metadata should already be in Perl's internal format, unless
SVG::Metadata is doing something wrong.) When you write to the file, you do so
in UTF-8 mode:

  open(OUT, ">:encoding(utf-8)", $file) or die;

> I don't have a way, as far as I am aware, to type non-ASCII characters.

Try typing vowels with the AltGr key held down. Works for me, at least, although
it's a rather limited set of non-ASCII characters.          
     
     
--           
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email         
     
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the clipart mailing list