Use unicode text in plugins

Hello, I was wondering, is it possible to use unicode texts in plugins? Whenever I write with Bengali or put signs like ☺☻♥♠ in .php extension files, they appear to be '?'.

 

I need to do this to be able to create a network in Bengali.

  • I don't think browser is the issue. The usual causes I have seen are these:

    • The PHP script is not saved in UTF-8 encoding.  That's why we need to make sure that the editor is saving in the correct encoding.  Also on Windows especially, sometimes "byte order mark" (see http://en.wikipedia.org/wiki/Byte_order_mark) get written to the file and may cause problem.
    • Encoding is not properly communicated to the browser.  This could be caused by misconfiguration of Apache/PHP or wrong <meta> tag in the HTML page.  Viewing the page info (right click and select "View Page Info" for Firefox) will help determine.
  • @PLai I'm sorrry, but I didn't get it. How exactly am going to fix this on my Elgg network ...? How can viewing to source of the page would help me find out the root of all worries?

     

    I'm sorry, I am not a crack PHP expert ... :-P

  • In DreamWeaver, for every 'view' page that must show UTF characters, you must open the page in the editor, go to menu Modify / Page Properties, select Title/Encoding and choose 'Unicode (UTF-8)' in the Encoding list. Save it and upload it again. That should fix the problem. I checked in CS4 but I guess it's the same in CS3.

  • I have alread done that. But, no use. The unicode text doesn't show up. :-( I have also checked the box 'Include Unicode Signature (BOM)'.

  • You don't want a BOM--that will cause major problems with PHP.  What happens when you view these files with editors other than DreamWeaver?

  • This solution must work Shouvik. If you add bengali characters by hand in a page, I mean, not read them from the db, they don't show either?

  • You don't want a BOM--that will cause major problems with PHP.  What happens when you view these files with editors other than DreamWeaver?

    Actually, the problem is, the letters show up on Dreamweaver. But, not on the elgg site. They can also be seen from MS Word 2007.

     

    This solution must work Shouvik. If you add bengali characters by hand in a page, I mean, not read them from the db, they don't show either?

    I can read Bengali on any other website like amarblog.com, which uses Wordpress. The problem happens only with Elgg.

  • I can read Bengali on any other website like amarblog.com, which uses Wordpress. The problem happens only with Elgg.

    Yes, I understand it's not a browser problem. But if you add bengali characters by hand in your Elgg pages, not read from the database, they don't show either?

    I added a bengali text to a blog entry in my elgg implementation (1.5) and they appear correctly.

  • Yes, I understand it's not a browser problem. But if you add bengali characters by hand in your Elgg pages, not read from the database, they don't show either?

    I added a bengali text to a blog entry in my elgg implementation (1.5) and they appear correctly.

    Yes I have added Bengali blog entries and edited profile-details and they seem to appear flawlessly.

  • If text you enter in Elgg forms works but not text you enter in PHP files, then that suggests that your problem may be the editor you are using to create the PHP files rather than Elgg.