Hi,

I'm having trouble displaying punjabi text on any content type. It should display ਪਂਜਾਬੀ but it displaying ??????
Its working on here brilliantly!!

ਮੇਹ ਪਾਗਲ ਹੌਗੀਆ - i'm gone crazy!!!

What have they done that i haven't???

My punjabi content is typed up on a local machine, using a punjabi font. GUCA, which converts certain punjabi fonts to unicode.

So i've got my punjabi text as unicode, when i paste it into a content type it displays as punjabi , but when i press submit it displays as question marks.

I've added and enabled the following modules:

  • Internationalization 5.x-2.1
  • i18n - blocks 5.x-2.1
  • i18n - menu 5.x-2.1
  • i18n - profile 5.x-2.1
  • i18n - taxonomy 5.x-2.1
  • i18n - views 5.x-2.1
  • Translation 5.x-2.1
  • i18n - content types 5.x-2.1
  • Strings
  • Synchronization
  • Translatable Text

In Localization i've added the punjabi language, code is "pa" and is enabled.
Do i need to do anything with .po file?
Could it be the database collation?

I look forward to hearing from you.

Thanks in advance.

Comments

wmgildersleeve’s picture

First off, it'd be helpful if you could post an example page so we could see what's going on--it's very difficult to see what might specifically be wrong with your site without an example.

The .po file is a file containing language-specific translations. It pairs specific string keys to the localized translation. The only thing it's good for is to import translations into a local Drupal installation. Whether or not you imported or otherwise used a .po file should have no bearing on the display of the special characters on your site.

As to collations, it is possible. But I'd first suggest posting a link to a page showing your efforts. If you could do that, then the role of collations might be ruled out.

If you don't have a public page in Punjabi, perhaps you could save an example as simple HTML and post it somewhere. This at least would be a start. (Don't trim the file or edit it in any way--post the file exactly as your browser saves it.)

Walter

gsingh’s picture

Hi,

Please vist b h a t s i k h .c o m / m a i n / ? q = e n / n o d e / 8 - Please take out the spaces

gsingh’s picture

Anyone any ideas??? i've installed a few different versions, its has to be the database collation! but not sure what it need to be??

Gurpartap Singh’s picture

You had emailed me long time ago requesting for support about this, replied you back, but the email bounced. Re-mailed you the next day and it again bounced back. Will try to search for the mail which bounced and reply back here.

Gurpartap Singh’s picture

GUCA shouldn't be causing any problem till the converted text is in unicode format. You need your database collation to be utf-8. Also, does your php has mbstring installed(Drupal's status page tell about that.)? Also, does your browser is fully supporting unicode? Though, the latests are.

On default installation of drupal, everything works just fine here. Try a different test install. Keep it clean and create a page in ਪੰਜਾਬੀ. ਅਾਸ ਕਰਦਾਂ ਹਾਂ ਕਿ ੳੁਹ ਚੱਲੇਗਾ। ਫਿਰ ਵੀ ਜੇ ਲੋੜ ਪੲੀ ਤਾਂ ਜ਼ਰੂਰ ਸੰਪਰਕ ਕਰਨਾ। ਫ੍ਰੀ-ਨੋਡ 'ਤੇ #punjabi IRC channel ਹੈ, ੳੁੱਥੇ ਅਸੀਂ ਕੰਮ ਨਿਪਟਾ ਸਕਦੇ ਹਾਂ! :)

gsingh’s picture

Sorry for the delay, back from holiday!! i'll join up and get chatting to you later on today.

gsingh’s picture

Hi, tired connecting to the irc channel but the punjabi is not available. What time are best to catch you?

I've check the mbstring, via phpinfo()

Result:

mbstring
Multibyte Support enabled
Japanese support enabled
Simplified chinese support enabled
Traditional chinese support enabled
Korean support enabled
Russian support enabled
Multibyte (japanese) regex support enabled

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.internal_encoding ISO-8859-1 no value
mbstring.language neutral neutral
mbstring.substitute_character no value no value

Is this configuration correct?

MY database is configured to utf8_unicode_ci, but still getting the question marks..."????? ?? ??"

Any ideas?

hubris’s picture

I had the same problem, several multi-byte languages would display as '??????' on the screen after submitting the content to a Drupal site.

The database was messing it up because the database isn't set to use UTF-8 collation.
Which occurs if you've migrated from an old installation, or installed Drupal with Fantastico.

I ran the php script found here:
http://www.urbannatives.net/localtreechild/drupal/drupal_code/script_con...

I ran it by creating a Page on my site, setting the input type as PHP, and pasted the code in there. Then clicked Submit. The code runs immediately after that, and will eventually report back a list on tables successfully convertes to UTF8. You can delete the page right afterwards.

Note: Standard 'Backup your database before doing this ...' warnings apply
Also, it won't fix existing content that is already in the database. Only new content that you store in the database will display correctly after this fix.

-Chris