title: String concatenation containing Arabic and Western characters
body: <p>I'm trying to concatenate several strings containing both arabic and western characters (mixed in the same string). The problem is that the result is a String that is, most likely, semantically correct, but different from what I want to obtain, because the order of the characters is altered by the Unicode Bidirectional Algorithm. Basically, I just want to concatenate as if they were all LTR, ignoring the fact that some are RTL, a sort of "agnostic" concatenation.</p>
  
  <p>I'm not sure if I was clear in my explanation, but I don't think I can do it any better.</p>
  
  <p>Hope someone can help me.</p>
  
  <p>Kind regards,</p>
  
  <p>Carlos Ferreira</p>
  
  <p>BTW, the strings are being obtained from the database.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><img src="https://i.stack.imgur.com/dwBWZ.png" alt="enter image description here"></p>
  
  <p>The first 2 Strings are the strings I want to concatenate and the third is the result.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Actually, the concatenated String is a little different from the one in the image, it got altered during the copy+paste, the 1 is after the first A and not immediately before the second A.</p>