Bug 374172 - Dont double encode strings.xml
Summary: Dont double encode strings.xml
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sequoyah (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 04:40 EDT by Rainer CLA
Modified: 2016-11-08 14:46 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer CLA 2012-03-14 04:40:16 EDT
Current version:  
* Sequoyah Android Localization Editor	2.0.1.M20110913-0203	
* Sequoyah Localization Tools	2.0.1.M20110913-0203	

StringLocalizationFileManager seems to reopen the file and try encode all occurrences of < and > with &gt;, ... However, this is not really what we want. 

Please consult the android string resource documentation where it is stated that normal html strings can be encoded as usual

http://developer.android.com/guide/topics/resources/string-resource.html

e.g. 

<string name="myhtml">this is <b>bold</b>.</string>

However, if I open the file in Sequoyah and save it, then it turns this string into

<string name="myhtml">this is &lt;b&gt;bold&lt;/b&gt;.</string>

The result is that you can no longer read the text via 
Activity.getText(R.string.myhtml) but instead you need to run it through Html.fromHtml() which is tedious.

So if Sequoyah wants to be really smart it should only do this conversion in case there are format parameters in the string which makes this double encoding necessary. For normal strings which contain html, I would like to have Sequoyah not mess with these.
Comment 1 Peter V CLA 2012-03-14 06:22:21 EDT
This issue is a problem for me too (also on Mac). I just wanted to report this myself.
I have some HTML entitiey in my string.xml and they always broke in the moment I open it with sequoyah.

Please fix this soon :)

Thanks