Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I changed post_title, post_contents, and post_name to allow for utf by changing collating sequence to: utf8_general_ci

Then using add new post, I type for the title three Hebrew ALEFs.
The post_title is in Hebrew in the database, but the post_name has this value:

%d7%90%d7%90%d7%90

According to Charmap, ALEF has a hex value of 05D0.
So what does the d790 represent? Some other encoding?

I'm looking to write a program to mass upload a bunch of posts, so I need to know what to put in the post_name field, and what it is used for.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

it's the URL encoded version of your text.

<?php
echo urldecode('%d7%90%d7%90%d7%90');
?>

outputs:

אאא

post_name is the slug, so the characters have to be URL-safe.

share|improve this answer
    
But wouldn't the encoded hex have to match what CharMap.exe shows? –  NealWalters Feb 26 '12 at 18:35
    
And I'm storing the Hebrew words in a custom post type which will be used accessed via ShortCodes on real "pages", so if I never intend to display the page, can I leave the post_name null? –  NealWalters Feb 26 '12 at 18:41
    
@NealWalters - it's not hexadecimal encoding, it's a different format. –  Milo Feb 26 '12 at 18:41
    
@NealWalters - you probably can leave them null, I've never tried though, so not sure what other side effects that may have. –  Milo Feb 26 '12 at 18:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.