Using non-English characters

jasondgardner - December 17, 2008 - 13:52
Project:Scripture Filter
Version:6.x-1.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

So far, I have been able to install this module and edit the .inc file to default to the Portuguese version of the Bible. My question is, how can I edit the books of the Bible to reflect the Portuguese spelling? Specifically, with regards to accent marks and such. For example, in Portuguese, Genesis is written Gênesis. When I edited the $book_regex to the Portuguese spelling, it broke the filter.
I say that in some of the code, the is a ? mark in the name. What exactly does this do? Is it some sort of wild card?

I am new to PHP, so forgive me if there is an obvious answer.
Jason

#1

beeradb - December 18, 2008 - 21:40

My guess is that this issue is caused by the usage of preg_replace on line 62 of scripturefilter.inc. preg_replace is not multibyte compatible, and therefor doesn't gracefully handle some unicode characters. Try changing the preg_replace on line 62 of scripturefilter.inc to a mb_ereg_replace() function call, which plays nice with multibyte characters.

If this works for you I'm sure the original author would love it if you submit a patch which fixes the issue.

#2

jasondgardner - December 26, 2008 - 15:42

Thank you very much.
I'll try that out and if/when I can get it working... I'll be sure to submit the patch.
Merry Christmas.

 
 

Drupal is a registered trademark of Dries Buytaert.