I can't insert Arabic Text with Braces

  • Hi,
    I've been given a spreadsheet of some Arabic text that provides a description of a fault code., in English it would look like this 'Click-to-Call from Operator {5}'
    The braces act as placeholder for the appplication to replace and display.
    In Arabic the spreadsheet provided to me looks like this: انقر للاتصال من المسؤول {5}
    As you can see the braces are perfectly formed.
    Ideally I want to compose my DML statements from the spreadsheet as I need to produce a script I can send out to my engineer.
    The result of the formula in Excel looks like this, perfect braces again:

    UPDATE LocalisedCodes SET CodeDescription = N'انقر للاتصال من المسؤول {5}' WHERE Code = 9783 Culture = 'AR-SA'

    But as soon as I copy and paste that into SSMS or Notepad++ it transposes the braces to:

    When I paste it in here the braces are formed OK again, hence the screen shot of my SSMS window!
    It's the same when I attempt to use the Import Wizard, although that wouldn't have been a solution anyway.

    Not all the translations provided to me have the issue with braces, I've tried to establish a pattern but nothing is leaping out at me.
    It can't be a Collation setting as i'm having the same result pasting into Notepad++
    Has anyone else had this problem and found a solution?
    Thanks for any help.
    Regards
    Giles

  • I'm finding it difficult to spot the difference here...  can you highlight the problem areas?

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • When I copy and paste your post in normal notepad:

    and SSMS:

    Have you played with regional settings and Language on the OS level? (stab in the dark)
    My regional settings and Language, South Africa, English (English United States), I suspect the regional and language settings might be adjusting the text.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • I suspect the problem is that you have characters that are read right to left, and well as characters read left to right. When you copy those, the positions change, due to the encoding (and probably it's just plain confusing, as where do you start reading a string that it read both left to right and right to left at the same time?). If the {5} and unicode string represent different things, I'd suggest trying to separate them into 2 different columns; rather than 1.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Thanks gents for taking the time to look at my problem.
    Thomas Rushton: In the required text the braces are paiered around the 5 {5}, however in the screenhot of the SQL Statement the opening brace has been removed and another closing brace put at the end of the string.

    If you like weird and wonderful stuff try this: 
    Copy the requried string below

    ?PID ???????? {0} RF ????? ????? ???

    Paste into a new query window in SSMS.  It should look as required.
    Now encapsulate it in apostrophes to turn it into a string. Voila! the braces are broken apart.
    I do have RedGate Toolbelt installe but I can't see anything in the configuration of Prompt that would do this.

    I have also spotted a pattern, the braces are only broken when the first character of the required text is not Arabic, so either a Latin letter or a character like an opening brace!
    That's undegoing some tests at the moment but should that be proven then my plan of action is to ask our client nicely for alternative translations, starting with an Arabic letter.

  • Ah, right.  +1 for Thom A's suggestion of Unicode Left-to-Right / Right-To-Left characters embedded in the string.

    interesting that this also reverses the direction of the brackets.  🙂

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply