First time here? Check out the FAQ!
1

unicode issue in tag and url
 

I have askbot successfully running. Thanks for this beautiful project.

Two unicode issues, while 'ask a question' -

  1. I cant put a unicode word as tag. (Error: use-these-chars-in-tags)

  2. Is it possible I get the unicode title in the url? For example, I put the title as मलेशिया में जलवायु , whereas after posting, I get the url as '/mleshiyaa-men-jlvaayu'.

Any workout much appreciated.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
str's avatar
91
str
asked 13 years ago

Comments

see more comments

1 Answer

0

Hello, firstly - it is possible in principle to make urls show unicode characters, but not all browsers support it well - we can make an experimental feature for that.

Regarding unicode in tags - it works, but the test for acceptable tag forbids non-word characters, the error message should really read: "Only word characters, and symbols +-.# are allowed in the tags."

For example, in जलवायु the character that goes just before the last is not accepted. What does it mean not sure whether it is right or not - we will need your help here.

What language is this?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 13 years ago
link

Comments

Many Thanks. for the unicode part in url - could you please point me to the code I've to change, unless you dont' come up with the experimental feature shortly. For the tag - my example is with a Hindi word - u mean not all the characters in that word are Unicode?

str's avatar str (13 years ago)

Then there must be a bug in the python regex module or maybe in the browser (try entering the same chars in a different browser). It seems to be thinking that you have a word break within the sequence of characters. The solutions to these would be: (1) identify and fix the bug in the program that causes the error; (2) in askbot relax the rules on tag validation, maybe per some optional setting.

Evgeny's avatar Evgeny (13 years ago)

thanks again. I'm working with mainly Bengali (that word was Hindi, anyway). Please check with a sample word in Bengali, বাংলাদেশ (this is the name of the country, Bangladesh)

str's avatar str (13 years ago)

The slugification code is in askbot.utils.slug.slugify. Actually there is an option already that will enable unicode support in the slug portion of the urls, it is not yet in the live settings, but in django's settings.py file ALLOW_UNICODE_SLUGS.

Evgeny's avatar Evgeny (13 years ago)
1

Strange, the last word you entered in the comment does not show well in my Chrome.

Evgeny's avatar Evgeny (13 years ago)
see more comments