Issue 109834 - Calc converts '%2B' in URL to '+' in .xls file
Summary: Calc converts '%2B' in URL to '+' in .xls file
Alias: None
Product: Calc
Classification: Application
Component: editing (show other issues)
Version: OOO310m11
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: needmoreinfo, oooqa
Depends on:
Reported: 2010-03-05 02:33 UTC by dcnicholls
Modified: 2013-08-09 12:55 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description dcnicholls 2010-03-05 02:33:42 UTC
When I embed a URL link for an entry in a Calc cell in an xls file which
includes the string '%2B', calc automatically converts this to its ASCII
character, '+'

In the case of the URL
the server requires '%2B' and _not_ '+', a character it uses for other purposes.

As far as I can tell, it's not possible to get OO Calc to embed the unaltered
string.  To make this work I had to edit the xls file with a hex editor (Hexfiend).
Comment 1 Rainer Bielefeld 2010-03-06 07:37:12 UTC
NOT reproducible with "Ooo 3.1.1 WIN XP DE[OOO310m19 (Build 9420)]"!
Mac specific?

Please contribute a clear step by step instruction containing all observations
(error messages ...), _every_key_press_and_every_mouse_click_ how to reproduce
the problem.
Comment 2 dcnicholls 2010-03-06 15:07:13 UTC
Here's the sequence:

Create a .csv text file with a one line entry 'fred,1' (I used the Mac program to do this)
Open it in Open Office Calc.
Save it as a Microsoft Excel 97/... .csv file
Select the second cell containing the numeral '1'
In the Input Line slot, select the numeral '1' using the mouse
Click on the hyperink icon in the tool bar
Enter the URL ''
Click Apply
Select another cell with the mouse then click on the newly created hyperlink
You will find that the URL it opens is '
ie it has converted the percent-2-B to '+'

No error messages, just an unrequested ASCII character conversion.
Comment 3 dcnicholls 2010-03-07 00:30:58 UTC
I might add that the same result happens whether you type or paste the URL into the hyperlink window; 
and that I use in pure text mode, not RTF.

In the case of these two URLS, the correct one works and the one with the substituted ASCII char breaks on 
the website in question
Comment 4 AH 2012-03-27 06:20:36 UTC
Reproduced with 3.2.1 and 3.3.0 running on Windows 7 and XP.

Steps to reproduce:
1: Copy the URL provided by dcnicholls
2: Go to Insert -> Hyperlink
3: Paste the copied URL into the "Target" input box, press Apply and close
   the dialog box. 
4: Execute the link and a wrong page is shown
5: Select the link and go to Insert -> Hyperlink
6: Check the URL in the "Target" input box to see "%2B" is converted to "+"

Work around:
* Enable "Automatic URL Recognition" and paste the URL into a cell.
  Auto replaced link works ok and "%2B" remains as is w/o being replaced.
* Use "Push Button" from "Form Controls" and use its
  "Open document/web page" function.

I believe it's to do with the character encoding used when converting
texts into a hyperlink at Hyperlink dialog box. Also reproducible with
Writer and Impress.
Comment 5 AH 2012-03-27 06:25:40 UTC
Sorry for the double post.

I forgot to add that I could reproduce the bug on newly created OOo files.
Tested with Calc, Writer and Impress. All tests came out positive and could
reproduce every time with the given steps.
Comment 6 Rob Weir 2013-02-02 03:00:36 UTC
This Issue requires more information ('needmoreinfo'), but has not been updated
within the last year. Please provide feedback as requested and re-test with the the latest version of OpenOffice - the problem(s) may already be addressed. 

You can download Apache OpenOffice 3.4.1 from

Please report back the outcome of your testing, so this Issue may be closed or
progressed as necessary - otherwise the issue may be Resolved as Invalid in the
Comment 7 dcnicholls 2013-02-02 07:30:55 UTC
Sorry, I no longer use Open Office.  If you're unable to test the bug from my detailed description, I suggest the bug be closed.
Comment 8 urmasd 2013-02-05 03:32:54 UTC
Just pasting URL in cell should work it around.
Also, all the necessary information have already been given.
Comment 9 orcmid 2013-02-05 04:12:11 UTC
This is a genuine bug if it still occurs.  That should be verified.

The "+" character is reserved as a sub-delimiter and it must be escaped (%-encoded) when a delimiter purpose is not intended for it.  Since only the person entering the URI can know the correct intention, %-encoded reserved characters should never be un-encoded by OpenOffice, especially for a URI that is destined to something external to the document.

(This explained in RFC3986 section 2.4 and the inclusion of "+" as a sub-delimiter and reserved character is in section 2.2. 

This needs to be confirmed.
Comment 10 Edwin Sharp 2013-08-09 12:55:09 UTC
As given in comment 4.

Rev. 1503704 Win 7