Encoding windows-1256

Homepage Clovertech Forums Cloverleaf Encoding windows-1256

  • Creator
    Topic
  • #114605
    alfonso rivero
    Participant

    Hello,

    Actually HIS is sending the message in encoding UTF-8 with some Arabic characters but my system not support that encoding, It waiting the encoding windows-1256

    I already tried the encoding Arabic but it not worked.

    I was wondering if there is way to support window-1256 in cloverleaf?

    Regards,

    Alfonso

     

Viewing 3 reply threads
  • Author
    Replies
    • #114606
      alfonso rivero
      Participant

      thank you but what is BBCodes?

      Regards,

      Alfonso

    • #114653
      Charlie Bursell
      Participant

      Not sure what he meant by using BBCodes but the meaning (from Google)
      <b>BBCode</b> (bulletin board code) is a collection of formatting tags that are used to format users’ posts in the Scratch Forums and the Text-based Games Forum. <b>BBCode</b> is based on the same principle as, and is similar to, HTML. <b>BBCode</b> can be used for things such as colored text, underlined text, pictures, and links.

      Not sure how you would use it for encoding or decoding.

    • #114682
      Rob Abbott
      Keymaster

      Alfonso, the engine supports Windows-1252.  In each thread’s properties, there is an ‘encoding’ dropdown.  Windows-1252 is an available option here.

      A few things you need to know:

      • all data in the engine is UTF-8
      • “ASCII” encoding will work for most cases.  If you are using extended ASCII or other character sets such as Arabic or Kanji, you’ll need to set the “encoding” option correctly:
        • You need to set the “encoding” to match the encoding scheme that the sending system is delivering or expecting.
        • The engine will then convert from the system encoding to UTF-8 on the way in, and vice versa on the way out
        • Encoding needs to be set properly for extended ASCII or non-English character sets, or you may see corruption of the data.

      So if your sending system is communicating in Windows-1252, set the “encoding” to that, and you should be good.

      Rob Abbott
      Cloverleaf Emeritus

      • #121415
        MiDo
        Participant

        we are still looking for the encoding of win1256 not win1252 for arabic support

        since the receiving system only support win1256

         

    • #114744
      Robert Kersemakers
      Participant

      Hi Alfonso,

      Follow Rob’s advice, so use the correct encoding for each system. And remember that inside the engine all is done in UTF-8. However…

      You state that your sending system is UTF-8 and it sends Arabic characters. More than likely these characters can’t be converted to a suitable windows-1252 counterpart, so they remain empty or will be malformed when the encoding is done. So you will need to convert these characters yourself before sending them on to the windows-1252 system.

      I am not sure whether a normal Cloverleaf installation has one or more scripts to deal with this conversion; I have recently asked our Dutch reseller for these and got them, but they are made by our Dutch reseller, so I can’t just publish them here.
      The script is not too difficult though: it processes the message by replacing certain characters with a regsub. Here are the regsub-commands I have added to convert all kind of apostrophes and quotes (as used in Word/Excel) to change them into a normal apostrophe/quote:

      regsub -all — {\u2018|\u2019|\u201A|\u201B} $msg \x27 msg ;#’
      regsub -all — {\u201C|\u201D|\u201E|\u201F} $msg \x22 msg ;#”

      Likewise you will need to add all Arabic characters and change them into the character you want.

      Hope this helps.

       

       

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

Viewing 3 reply threads
  • You must be logged in to reply to this topic.

Forum Statistics

Registered Users
5,115
Forums
28
Topics
9,290
Replies
34,422
Topic Tags
286
Empty Topic Tags
10