Unicode characters in Categories

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Lorand
Regular
Posts: 13
Joined: Tue Mar 29, 2016 11:57 am

Unicode characters in Categories

Post by Lorand »

I'm working on a new blog and so far everything is working as expected, except one strange thing: I can't create a new category if its name contains unicode characters (I'm interested only in the following ones: ă, ț, ș, Ă, Ț, Ș). If one of these are in the category name, the following error message appears: "403 Forbiddden - Access to this resource on the server is denied!" Every text entry in the database has collation set to "utf8_unicode_ci", and any other accepts all possible characters. Can't figure it out why just "category_name" behaves like this...
So far I managed to find a workaround: creating a new category without unicode characters and then editing the corresponding "category_name" from "seredipity_category" table using phpMyAdmin. It works (see category "Prăjituri" here: http://manupropria.ro/), but it would be too much trouble for my client. Is there a simpler way to add a category with unicode characters in its name?
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Unicode characters in Categories

Post by Timbalu »

Please add them as

Code: Select all

$i18n_filename_from[...]
and

Code: Select all

$i18n_filename_to[...]
array vars to you lang files in /lang/* and lang/utf-8/*. See examples here: https://github.com/s9y/Serendipity/blob ... nc.php#L17 and https://github.com/s9y/Serendipity/blob ... nc.php#L17

This should do. See http://board.s9y.org/viewtopic.php?f=11&t=20525

Edit: No sorry, the category name should do with those characters in the backend - in frontend they would just be /<category-id>-unknown, if called by category, eg "/categories/4-unknown" in the URL (and thats what we are talking about). But maybe the above helps here ..?

(I strongly assume this is another issue of your LiteSpeed Server...)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Lorand
Regular
Posts: 13
Joined: Tue Mar 29, 2016 11:57 am

Re: Unicode characters in Categories

Post by Lorand »

I contacted the hosting company about this issue and they deactivated a server-side mod_security filter.
Now I can insert any character I like in the Category name field. Problem solved! :)
Lorand
Regular
Posts: 13
Joined: Tue Mar 29, 2016 11:57 am

Re: Unicode characters in Categories

Post by Lorand »

BTW, that strange behaviour didn't affect just the unicode characters, in the New Category form I could use just the following characters: "a...z", "A..Z", "0...9" and "_". Any other character triggered that error message.
Post Reply