Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm looking for an app or other way to automatically replace specific characters with others, from a list of my definition. This should be done in every possible text edit field, inline.

Ideally I would type up some text and, if the keyboard I'm using is configured to do so, it would replace as I type or after a word is autocompleted. Unfortunately I haven't found any keyboard app that allows for this.

A second way to do this would be to complete typing in any text field, select all typed text, share or copy paste to another app that will do the replacement, then paste the replaced text back into the text field. This seems like the most realistic solution to be looking for, and one that I could consider writing myself. I figured I'd check for a more elegant or existing solution before considering that.

The main purpose of this is to accomodate whoever types in Greek and wants to use a keyboard's autocomplete functionality, in particular to send SMS in GSM-ASCII encoding and thus be able to use 160 characters per single SMS.

All keyboards that I've tried (Go Keyboard, Swype, Swiftkey, stock ICS, Samsung), exhibit the same issue, namely the capitalized versions of the words in their Greek dictionaries incorrectly include accents on the vowels. This probably happens because the dictionaries include only the lowercase versions of the words, while automatically uppercasing them on demand to save store space or to avoid what they perceive as duplication.

Unfortunately, although lowercase greek vowels may carry an accent, uppercase ones must not do so. More importantly, the 7-bit GSM-ASCII encoding for SMS transmission that allows for 160 characters per SMS only includes uppercase Greek characters without accents (it does not include lowercase ones). As soon as a single lowercase or accented uppercase character is typed, the SMS must be sent using UCS-2 encoding which is 16-bit and limits us to 70 characters per SMS.

The list of characters and their replacements is this:

Ά => Α
Έ => Ε
Ή => Η
Ί => Ι
Ό => Ο
Ύ => Υ
Ώ => Ω

Would anyone have any idea how to go about doing this, in an existing app or some sort of macro with string replacement functionality?

Apologies for the long question, if you reached this far. I thought it was important to state the background that lead to this limitation. Thanks in advance.

share|improve this question
    
Actually, 160-characters SMS only accepts the uppercase Greek characters that do not look similar to Latin ones (ΓΔΘΛΞΠΣΦΨΩ). So, it is not a matter of removing the accent; you need to convert to the corresponding Latin capital letter. –  user37208 Jul 8 '13 at 12:46

2 Answers 2

Shortly after asking the question, I went about exploring the 2nd option I had thought of, namely using an intermediate 3rd party app to copy typed text to, replace accents, copy it again, and paste it back into the text field of the initial app.

I looked into Tasker and after a couple of hours managed to get a crude but effective solution using its quick dialog creator (Scenes) with an input field and a single button. I paste the accented text into the input field, click the button, and it removes all accents, copies to clipboard, and destroys the scene. For ease of use I am launching that one from a Task Cut shortcut that can be added to any home screen or even better, from a Swipepad portal.

Thus the crude and intermediate solution is the following:

  • type autocompleted capitalized greek words in SMS or other app, select all, copy
  • without switching apps, swipe to the Task Cut shortcut that opens the created Scene
  • paste into the text field and click on the button, which removes accents from uppercase vowels, copies back into clipboard, and destroys the scene
  • back in the initial app, select all, paste overwriting with the unaccented text

It is unfortunately not free as it requires the paid app Tasker. Hopefully the keyboard or atleast SMS apps will allow for this functionality, or even better someone will write the equivalent in a native android app.

I am including below the Tasker XML that you can use to import this into Tasker, should you find it useful. Below it I'm including another version that, on button click, fetches from clipboard without needing the user to paste the text. That one, however, requires root.

<TaskerData sr="" dvi="1" tv="1.3.1m">
<Scene sr="sceneRemove Accents From Greek Uppercase Vowels">
<cdate>1350679378737</cdate>
<edate>1350725381426</edate>
<gridSize>18</gridSize>
<heightLand>-1</heightLand>
<heightPort>362</heightPort>
<nme>Remove Accents From Greek Uppercase Vowels</nme>
<widthLand>-1</widthLand>
<widthPort>384</widthPort>
<EditTextElement sr="elements0">
<flags>4</flags>
<geom>20,20,343,214,-1,-1,-1,-1</geom>
<valueselectedTask>45</valueselectedTask>
<Str sr="arg0" ve="3">TxtUserInput</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="0"/>
<RectElement sr="background">
<flags>4</flags>
<geom>-1,-1,-1,-1,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3"/>
<Int sr="arg1" val="0"/>
<Str sr="arg2" ve="3">#77333333</Str>
<Str sr="arg3" ve="3">#77333333</Str>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3">#FF000000</Str>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</RectElement>
</EditTextElement>
<ButtonElement sr="elements1">
<clickTask>44</clickTask>
<flags>4</flags>
<geom>50,243,288,105,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3">BtnSubmittedText</Str>
<Str sr="arg1" ve="3">Remove accents and copy to clipboard</Str>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Img sr="arg6" ve="2"/>
</ButtonElement>
</Scene>
<Task sr="task44">
<cdate>1350679493963</cdate>
<edate>1350679493963</edate>
<id>44</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">%TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act1" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ά</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Α</Str>
</Action>
<Action sr="act10" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Str sr="arg1" ve="3">%TempUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act11" ve="3">
<code>105</code>
<label>Copied to clipboard</label>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>49</code>
<Str sr="arg0" ve="3">Remove Accents From Greek Uppercase Vowels</Str>
</Action>
<Action sr="act2" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Έ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ε</Str>
</Action>
<Action sr="act3" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ή</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Η</Str>
</Action>
<Action sr="act4" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ί</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act5" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϊ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act6" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ό</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ο</Str>
</Action>
<Action sr="act7" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ύ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act8" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϋ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act9" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ώ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ω</Str>
</Action>
</Task>
<Task sr="task45">
<cdate>1350723583443</cdate>
<edate>1350723583443</edate>
<id>45</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtUserInput</Str>
<Str sr="arg1" ve="3">%new_val</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
</Task>
</TaskerData>

The below saves 1 step (pasting into the scene) but requires root:

<TaskerData sr="" dvi="1" tv="1.3.1m">
<Scene sr="sceneRemove (ROOT) Accents From Greek Uppercase Vowels">
<cdate>1350679378737</cdate>
<edate>1350727181786</edate>
<gridSize>18</gridSize>
<heightLand>-1</heightLand>
<heightPort>362</heightPort>
<nme>Remove (ROOT) Accents From Greek Uppercase Vowels</nme>
<widthLand>-1</widthLand>
<widthPort>384</widthPort>
<EditTextElement sr="elements0">
<flags>4</flags>
<geom>20,20,343,214,-1,-1,-1,-1</geom>
<valueselectedTask>46</valueselectedTask>
<Str sr="arg0" ve="3">TxtUserInput</Str>
<Str sr="arg1" ve="3"/>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Int sr="arg6" val="0"/>
<RectElement sr="background">
<flags>4</flags>
<geom>-1,-1,-1,-1,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3"/>
<Int sr="arg1" val="0"/>
<Str sr="arg2" ve="3">#77333333</Str>
<Str sr="arg3" ve="3">#77333333</Str>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3">#FF000000</Str>
<Int sr="arg6" val="0"/>
<Int sr="arg7" val="0"/>
</RectElement>
</EditTextElement>
<ButtonElement sr="elements1">
<clickTask>47</clickTask>
<flags>4</flags>
<geom>50,243,288,105,-1,-1,-1,-1</geom>
<Str sr="arg0" ve="3">BtnSubmittedText</Str>
<Str sr="arg1" ve="3">Remove accents and copy to clipboard</Str>
<Int sr="arg2" val="16"/>
<Int sr="arg3" val="100"/>
<Str sr="arg4" ve="3">#FF000000</Str>
<Int sr="arg5" val="0"/>
<Img sr="arg6" ve="2"/>
</ButtonElement>
</Scene>
<Task sr="task46">
<cdate>1350723583443</cdate>
<edate>1350723583443</edate>
<id>46</id>
<Action sr="act0" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtUserInput</Str>
<Str sr="arg1" ve="3">%new_val</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
</Task>
<Task sr="task47">
<cdate>1350679493963</cdate>
<edate>1350679493963</edate>
<id>47</id>
<Action sr="act0" ve="3">
<code>51</code>
<Str sr="arg0" ve="3">Remove (ROOT) Accents From Greek Uppercase Vowels</Str>
<Str sr="arg1" ve="3">TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Str sr="arg3" ve="3">%CLIP</Str>
</Action>
<Action sr="act1" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">%TxtUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act10" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ώ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ω</Str>
</Action>
<Action sr="act11" ve="3">
<code>547</code>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Str sr="arg1" ve="3">%TempUserInput</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
</Action>
<Action sr="act12" ve="3">
<code>105</code>
<label>Copied to clipboard</label>
<Str sr="arg0" ve="3">%TxtResult</Str>
<Int sr="arg1" val="0"/>
</Action>
<Action sr="act13" ve="3">
<code>49</code>
<Str sr="arg0" ve="3">Remove (ROOT) Accents From Greek Uppercase Vowels</Str>
</Action>
<Action sr="act2" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ά</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Α</Str>
</Action>
<Action sr="act3" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Έ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ε</Str>
</Action>
<Action sr="act4" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ί</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act5" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϊ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ι</Str>
</Action>
<Action sr="act6" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ή</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Η</Str>
</Action>
<Action sr="act7" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ό</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Ο</Str>
</Action>
<Action sr="act8" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ύ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
<Action sr="act9" ve="3">
<code>598</code>
<Str sr="arg0" ve="3">%TempUserInput</Str>
<Str sr="arg1" ve="3">Ϋ</Str>
<Int sr="arg2" val="0"/>
<Int sr="arg3" val="0"/>
<Int sr="arg4" val="0"/>
<Str sr="arg5" ve="3"/>
<Int sr="arg6" val="1"/>
<Str sr="arg7" ve="3">Υ</Str>
</Action>
</Task>
</TaskerData>
share|improve this answer

Just for completeness, have you tried the MessagEase keyboard? I don't know anything about its Greek features, but based on its English features, it's fairly likely to allow you to type what you want the first time.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.