Drupal node_save and special characters.
Posted
by Pierre
on Stack Overflow
See other posts from Stack Overflow
or by Pierre
Published on 2010-03-12T03:04:16Z
Indexed on
2010/03/12
3:07 UTC
Read the original article
Hit count: 574
Hello, i'm trying to create nodes and taxonomy terms through a custom php script by using the node_save() function.
I'm working on drupal 6.
It's working well (thanks to previous questions on stackoverflow) except for accented letters.
Indeed, when a title or a taxonomy term contain "é", "è" or "à", the sentence is cut before those special characters.
For example, a title like that: "Bonjour les éléphants" will create a node with "Bonjour les " as title.
I don't know if it's linked to my database or if i have to use a special encoding in php (iconv() blabla)
The fact is, for drupal titles, i can not use html encoding (for example: é is é in html) because drupal will render é and not é...
When i create a taxonomy or a title manually, i have no problems and the accented letter is saved in the database as "é".
Soo if you can help me to create terms and title with accented letters, that will be great : )
Thank you !
© Stack Overflow or respective owner