Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 200904

Summary: Turkish character problems when commenting an issue in JIRA using built-in issue editor
Product: z_Archived Reporter: O&#287;uz Da&#287; <oguz.dag>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P2 CC: blpsilva, ekuleshov, mads.stavang, robert.elves, steffen.pingel
Version: devKeywords: helpwanted
Target Milestone: 2.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description O&#287;uz Da&#287; CLA 2007-08-23 04:00:02 EDT
Build ID: I20070621-1340

Steps To Reproduce:
Be sure you succesfully created a JIRA repository
1.Create a query list
2.Doublec click on an issue to open in editor
3.Write a comment and sycnchronize
4.You will see in the web, Turkish characters are all changed with some other weird characters


More information:

When you comment an issue from Web UI of Mylyn Component, nothing goes wrong.. I think problem is related with built-in issue editor or some regional settings.
Comment 1 Mik Kersten CLA 2007-08-24 00:56:41 EDT
Eugene, Steffen: what's the current status of encoding handing with the Jira Connector?  It was tricky to get this stuff right for Bugzilla...
Comment 2 Steffen Pingel CLA 2007-09-15 13:20:27 EDT
*** Bug 202235 has been marked as a duplicate of this bug. ***
Comment 3 Steffen Pingel CLA 2007-09-15 18:20:23 EDT
Here are my observations from a quick investigation:

1) encoding on mylyn.eclipse.org was set to UTF-8
 - submitting of taks with non-USASCII characters works
 
2) changed encoding to ISO-8895-1
 - Umlauts (which can be represented in ISO-8895-1) were garbled

The JIRA connector explicitly sets the charset in JiraWebIssueService:

post.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");

That might need to be set to the repository charset (which can potentially be determined from the HTTP headers).


Comment 4 Steffen Pingel CLA 2007-09-16 00:18:54 EDT
Committed fix to CVS.

- The character set is now determined from the HTTP headers when the repository is validated.
- If the encoding can not be determined a warning is displayed in the repository settings dialog and UTF-8 is used as the fallback.
- Older Mylyn installations are likely to have the default charset (UTF-8) set which might not match the repository encoding. To avoid using the wrong charset it is dynamically determined during server login until the user once validates the repository.
Comment 5 Steffen Pingel CLA 2007-09-16 00:20:28 EDT
Marking as resolved.
Comment 6 Steffen Pingel CLA 2007-09-16 00:20:30 EDT
Created attachment 78511 [details]
mylyn/context/zip
Comment 7 Eugene Kuleshov CLA 2007-09-16 12:53:28 EDT
Great stuff Steffen!

BTW, if user will manually set encoding in repo settings, will we use that encoding with your patch?
Comment 8 Steffen Pingel CLA 2007-09-16 13:06:26 EDT
You need to validate the repository once. If you manually set the character encoding after that, it will be used.
Comment 9 Mik Kersten CLA 2007-09-17 21:44:29 EDT
Great stuff Steffen!  Should we consider auto-detection of encoding as something that should be done at the framework level?
Comment 10 Steffen Pingel CLA 2007-09-17 23:48:16 EDT
I don't think we need any additional facilities on the framework level. The detection code is very connector specific and in the case of HTTP trivial as it is read from the headers.
Comment 11 Steffen Pingel CLA 2007-09-18 13:42:49 EDT
A fixed dev build is available from the update site:

 http://www.eclipse.org/mylyn/downloads/builds.php
Comment 12 Steffen Pingel CLA 2007-09-18 13:43:40 EDT
*** Bug 200430 has been marked as a duplicate of this bug. ***
Comment 13 Bruno Luiz Pereira da Silva CLA 2007-09-18 14:35:45 EDT
Hi, I have noticed a different behavior on the server validation, as it did change my encoding preferences do ISO-8859-1.

However, when i try to synchronize queries with the server, i still get the same error i reported on bug #200430 ("com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException:
Invalid byte 2 of 3-byte UTF-8 sequence")
Comment 14 Bruno Luiz Pereira da Silva CLA 2007-09-18 14:37:33 EDT
Just for the record, i've used the DEV builds present in the following update sites:

download.eclipse.org/tools/mylyn/update/dev/e3.3
download.eclipse.org/tools/mylyn/update/dev/extras
Comment 15 Steffen Pingel CLA 2007-09-18 14:43:47 EDT
Thanks for the feedback. I have reopened bug 200430 to investigate the problem.
Comment 16 O&#287;uz Da&#287; CLA 2007-09-18 15:21:25 EDT
(In reply to comment #11)
> A fixed dev build is available from the update site:
> 
>  http://www.eclipse.org/mylyn/downloads/builds.php
> 

(In reply to comment #11)
> A fixed dev build is available from the update site:
> 
>  http://www.eclipse.org/mylyn/downloads/builds.php
> 

Thanks for your effort... I tried, It works fine...