Bug 8694

Summary: xdg-email's url_encode: bug in escaping
Product: Portland Reporter: Kevin Krammer <kevin.krammer>
Component: xdg-utilsAssignee: Portland Bugs <portland-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Check for characters above 7bit ASCII

Description Kevin Krammer 2006-10-17 15:24:22 UTC
Just finished some tests with xdg-email and German Umlauts in texts like 
subject

For example:
./xdg-email test@foo.com --subject Überraschung

This generates the following mailto URI:
mailto:test@foo.com?subject=Ã%9Cberraschung

Correct would be
mailto:test@foo.com?subject=%C3%9Cberraschung

Seems the first part (Ã vs. %C3) is not escaped correctly

The transcoding to UTF-8 ny iconv is correct (checked by using QString in a 
C++ program to transcode the word)
Comment 1 Kevin Krammer 2006-10-22 08:59:00 UTC
Created attachment 7483 [details] [review]
Check for characters above 7bit ASCII

The first character of the UTF-8 multibyte sequence seem to be matched by the
regex looking for normal characters.

Checking for out if 7bit ASCII range first (numercial value > 127) seems to fix
the problem.
Comment 2 Kevin Krammer 2006-10-23 13:40:02 UTC
Patch reviewed by Waldo
Committed

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.