Handling non-English letters in custom field names

Discussion forum for MOD Writers regarding MOD Development.
Registered User
Posts: 26
Joined: Thu Dec 11, 2008 10:44 am

Handling non-English letters in custom field names

Post by newbie_niles » Sun Aug 30, 2009 4:07 pm

I'm running a forum which uses a non-English language. One of the custom fields I've created includes an umlaut character in it, which apparently makes the php code unable to recognise it; the code below works fine if I change "Exämple" to "Example" (in the code and in the forum custom field settings) but it does not work if I keep the umlaut.

I've tried replacing the "ä" with a hexadecimal NCRS (ä) but the php code didn't recognise that either.

Code: Select all

     	          	<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Exämple" -->
     	          	<!-- ENDIF -->
Is is possible at all to include umlaut characters in a way which the php recognises?
If not, is it possible to instead refer to the custom field's id, instead of it's name?

User avatar
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run

Re: Handling non-English letters in custom field names

Post by A_Jelly_Doughnut » Sun Aug 30, 2009 9:58 pm

The template engine only recognizes the latin A-Z characters, no umlauts or accents.

The profile field identifier, however, has the same limitations. You should be able to do:

Code: Select all

<!-- IF postrow.custom_fields.S_PROFILE_EXAMPLE -->
Where EXAMPLE is the field identifier.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish


Return to “[3.0.x] MOD Writers Discussion”